diff options
author | oshogbo <oshogbo@FreeBSD.org> | 2015-08-11 18:01:10 +0000 |
---|---|---|
committer | oshogbo <oshogbo@FreeBSD.org> | 2015-08-11 18:01:10 +0000 |
commit | cb6dbe5ae738e157194b66d8beba27a81dba8679 (patch) | |
tree | 32e26b14c60e6ebfcc2f270950ee385310394f91 /contrib/netbsd-tests/lib/libc | |
parent | 7ad07c63652bfc184ad44015e734dcfc719822c2 (diff) | |
download | FreeBSD-src-cb6dbe5ae738e157194b66d8beba27a81dba8679.zip FreeBSD-src-cb6dbe5ae738e157194b66d8beba27a81dba8679.tar.gz |
The nvlist_move_nvpair() function can fail in two cases, if:
- the nvlist error is set, or
- the nvlist case ignore flag is not set and there is attend to
add element with duplicated name.
In both cases the nvlist_move_nvpair() function free nvpair structure.
If library will try to unpack a binary blob which contains duplicated
names it will end up with using memory after free.
To prevent that, the nvlist_move_nvpair() function interface is changed
to report about failure and checks are added to the nvpair_xunpack()
function.
Discovered thanks to the american fuzzy lop.
Approved by: pjd (mentor)
Diffstat (limited to 'contrib/netbsd-tests/lib/libc')
0 files changed, 0 insertions, 0 deletions