Skip to content

libsepol: Validate policydb values when reading binary

James Carter selinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libsepol: Create function ebitmap_highest_set_bit()libsepol/include/sepol/policydb/ebitmap.h libsepol/src/ebitmap.c+21 -00 replies
2/2libsepol: Validate policydb values when reading binary policylibsepol/src/policydb.c libsepol/src/policydb_validate.c libsepol/src/policydb_validate.h+794 -120 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNicolas Iooss
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] libsepol: Validate policydb values when reading binary

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
Signature · 1 line
2.26.2