SELinux Security Module development
 help / color / mirror / Atom feed
* [PATCH 0/2] libsepol: Validate policydb values when reading binary
@ 2021-02-05 14:07 James Carter
  2021-02-05 14:07 ` [PATCH 1/2] libsepol: Create function ebitmap_highest_set_bit() James Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: James Carter @ 2021-02-05 14:07 UTC (permalink / raw)
  To: selinux; +Cc: nicolas.iooss, James Carter

Nicolas Iooss reports that fuzzing /usr/libexec/hll/pp with the
American Fuzzy Lop revealed that inconsistent policy modules could be
created that caused NULL dereferences and other problems.

This patch validates the policydb when reading in the binary policy. See
the description of the second patch for more details.

The validation requires a negligible amount of time to complete.

James Carter (2):
  libsepol: Create function ebitmap_highest_set_bit()
  libsepol: Validate policydb values when reading binary policy

 libsepol/include/sepol/policydb/ebitmap.h |   1 +
 libsepol/src/ebitmap.c                    |  20 +
 libsepol/src/policydb.c                   |  35 +-
 libsepol/src/policydb_validate.c          | 764 ++++++++++++++++++++++
 libsepol/src/policydb_validate.h          |   7 +
 5 files changed, 815 insertions(+), 12 deletions(-)
 create mode 100644 libsepol/src/policydb_validate.c
 create mode 100644 libsepol/src/policydb_validate.h

-- 
2.26.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-19 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-05 14:07 [PATCH 0/2] libsepol: Validate policydb values when reading binary James Carter
2021-02-05 14:07 ` [PATCH 1/2] libsepol: Create function ebitmap_highest_set_bit() James Carter
2021-02-05 14:08 ` [PATCH 2/2] libsepol: Validate policydb values when reading binary policy James Carter
2021-02-18  7:31 ` [PATCH 0/2] libsepol: Validate policydb values when reading binary Nicolas Iooss
2021-02-19 15:48   ` Petr Lautrbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox