Linux v6.1 was released on Sunday, December 11th; the SELinux and audit
highlights are below. Beyond these highlights, LWN.net
has summarized the major changes in this release made during the
first and
second weeks of the merge window.
SELinux
- A new LSM hook, and associated SELinux implementation, was added to control
the creation of
user namespaces.
Frederick Lawler, the patch author, summarized the new access control, which
adds the new “user_namespace” object class, in the patch description:
This patch implements a new user_namespace { create } access control
permission to restrict which domains allow or deny user namespace
creation. This is necessary for system administrators to quickly protect
their systems while waiting for vulnerability patches to be applied.
This permission can be used in the following way:
allow domA_t domA_t : user_namespace { create };
While not strictly a SELinux change, the
userfaultfd
subsystem was changed to always create userfaultfds with O_RDONLY permissions
instead of O_RDWR. This should have no functional change, as userfaultfds have
always been read-only, however opening the file descriptor with a read-write
permission request caused SELinux to check for both read and write permissions.
With this change SELinux should now only request the read permission when a
userfaultfd is opened.
Fix a bug caused by how the kernel was allocating memory during a policy
reload. The kernel was allocating memory for a label conversion using a
blocking mechanism while a lock was held, raising the risk of a deadlock/panic.
This fix changes the kernel code to use a non-blocking allocation in this case,
eliminating the risk of deadlock/panic.
Convert all of the SELinux policy boolean values in the kernel to use a
single type: signed integers. Prior to this change the booleans were
represented by a mix of signed and unsigned integer types; we do not believe
this was the source of any problems, but type consistency is important to
ensuring problem-free code.
Convert the SELinux policy install script tool to use
grep -Einstead of
theegreptool, which has been marked obsolete.
Remove more references to the SELinux runtime disable functionality as we are
in the process of
deprecating this functionality.
- Minor improvements and cleanups to constify function parameters and remove
unneeded variables.
Audit
Change the kernel to only free the “proctitle” information on task exit,
allowing the kernel to cache the string across multiple syscalls. While the
patch description did not provide any before-and-after performance measurements,
this should improve audit performance slightly.
Make use of the kernel’s existing time comparison functions instead of open
coding the time comparisons directly in the audit kernel code.
Minor improvements to the way values are compared in the kernel code. It
isn’t believed that any of these comparisons were the source of any audit
problems, but these changes should help ensure proper behavior in future
releases.
Minor cleanups to improve the comments in the code and remove unused or
redundant code.
💬 Topluluk tartışması ve yorumlar
Tartışmayı başlat: Social Chat yayın akışı veya yukarıdaki ekleme formuyla uzman katkısı gönder.