platform_external_selinux/libselinux
Nicolas Iooss c09fb32384 libselinux: make process_boolean() fail on invalid lines
When security_load_booleans() calls process_boolean() to parse a boolean
definition, process_boolean() returns a successful value when it fails
to use strtok_r() (e.g. when there is no "=" in the parsed line). This
leads security_load_booleans() to use uninitialized name and/or val when
setting the boolean into the policy.

This issue has been found using clang's static analyzer and is similar
to the one which has been fixed in libsepol with commit 76f8c04c19
("libsepol: make process_boolean() fail on invalid lines"). Fix it in
the same way.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2017-04-11 14:27:01 -04:00
..
include setfiles: Fix setfiles progress indicator 2017-01-27 09:39:22 -05:00
man setfiles: Fix setfiles progress indicator 2017-01-27 09:39:22 -05:00
src libselinux: make process_boolean() fail on invalid lines 2017-04-11 14:27:01 -04:00
utils libselinux: include errno.h instead of sys/errno.h 2017-01-09 16:00:22 -05:00
LICENSE initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libselinux: Add clean-pywrap and clean-rubywrap targets 2016-10-27 10:35:37 -04:00
VERSION Update VERSION and ChangeLog files for 2.6 final release. 2016-10-14 11:31:26 -04:00