Skip to content

Fix bugs related to policy declarations

James Carter selinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Fix problem with bounds statements in optional blockscheckpolicy/policy_define.c libsepol/src/expand.c libsepol/src/link.c+38 -70 replies
2/6Provide a better error message for implicit role and user boundscheckpolicy/module_compiler.c+8 -260 replies
3/6Fix an error in the policyd validation of user datumslibsepol/src/policydb_validate.c+5 -00 replies
4/6libsepol: Fix processing of levels for user rule in an optional blocklibsepol/src/module_to_cil.c+8 -150 replies
5/6libsepol: Fix problem with handling type attributes in role-types rulelibsepol/src/expand.c+122 -1070 replies
6/6libsepol: Expand role attributes when expanding instead of when linkinglibsepol/src/expand.c libsepol/src/link.c+126 -1820 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] Fix bugs related to policy declarations

In testing an upcoming patch to allow type attributes to be associated with other type attributes and expanding them before creating the kernel policy, I came across a bug in how type attributes were handled in role- type statements. This caused me to take a closer look at how declarations and the things associated to them were being handled.

With these patches, I feel that the code in link.c and expand.c is clearer and more robust.

James Carter (6):
Fix problem with bounds statements in optional blocks Provide a better error message for implicit role and user bounds Fix an error in the policyd validation of user datums
libsepol: Fix processing of levels for user rule in an optional block
libsepol: Fix problem with handling type attributes in role-types rule
libsepol: Expand role attributes when expanding instead of when
linking

 checkpolicy/module_compiler.c    |  34 +--
 checkpolicy/policy_define.c      |  11 +-
 libsepol/src/expand.c            | 396 +++++++++++++++++++------------
 libsepol/src/link.c              | 153 ++----------
 libsepol/src/module_to_cil.c     |  23 +-
 libsepol/src/policydb_validate.c |   5 +
 6 files changed, 296 insertions(+), 326 deletions(-)
Signature · 1 line
2.50.0