Change in osmo-hlr[master]: mdns_rfc.c: fix possible access of uninit. mem

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Tue Jan 14 07:55:50 UTC 2020


osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16846 )

Change subject: mdns_rfc.c: fix possible access of uninit. mem
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-hlr/+/16846/1/src/mslookup/mdns_rfc.c 
File src/mslookup/mdns_rfc.c:

https://gerrit.osmocom.org/c/osmo-hlr/+/16846/1/src/mslookup/mdns_rfc.c@106 
PS1, Line 106: 		memcpy(buf + i, qname + 1, len);
> Shouldn't a check be placed here?
There are checks above, which make sure that this is safe:

"buf + i" and len:
* the address that buf points to does not change in the loop
* buf has size OSMO_MDNS_RFC_MAX_NAME_LEN + 1 (line 79)
* check in line 94 makes sure, that buf + i + len does not write outside of buf's size

"qname + 1" and len:
* line 92: next_label = qname + len + 1;
* line 94: if (next_label >= qname_end || ...) return NULL;



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16846
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ifa269d8a88d84c01349668cdd8d1f1d24c12c6d8
Gerrit-Change-Number: 16846
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 14 Jan 2020 07:55:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200114/86fadcc7/attachment.htm>


More information about the gerrit-log mailing list