On Sat, Nov 14, 2026 at 12:05:55PM -0800, Chris Down wrote: > Not a big deal, but userspace can see that node too, as > /sys/kernel/security/apparmor/.null. Opening it by path works in current > kernels and fails with EACCES after this patch. Now, I don't know of > anything that does that, but selinuxfs gets SB_I_NODEV cleared again in > the next patch for the same kind of node, so I think we should do the > same thing here. If not, it would be good to have a line in the > changelog saying that opening it by path is meant to stop working.
Yeah, seems fine. Though, afaict aa refuses every read and write on .null in aa_file_perm(). So this change only moves the EACCES from read()/write() to open(). But I guess open() failing might be an issue, idk. I really really dislike this device node abuse on for both lsms. It's sketchy as hell.
