summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2026-09-23 12:13:23 +0200
committerPaul Moore <paul@paul-moore.com>2026-09-25 15:00:01 -0400
commit1ca924044bf0de879a1648be93a56939652267d3 (patch)
tree06023c720e0865f4b3176cb68610c580747d7866 /tools/lib/python
parent93f51579e7df248780214094418f205253383cc5 (diff)
downloadlinux-next-1ca924044bf0de879a1648be93a56939652267d3.tar.gz
linux-next-1ca924044bf0de879a1648be93a56939652267d3.zip
selinux: fix data race on AVC latest_notif
avc_policy_seqno() reads latest_notif without holding notif_lock, while avc_latest_notif_update() can update it under that lock. KCSAN reports these concurrent accesses during policy boolean updates and permission checks. Use READ_ONCE() for the lockless read and WRITE_ONCE() for the update. The spinlock continues to serialize the comparison and update against other writers. Reads made while holding notif_lock cannot race with a writer and can remain plain accesses. This marks both sides of the intentional concurrent access and constrains compiler transformations, without suppressing checking with data_race(). Cc: stable@vger.kernel.org Fixes: 788e7dd4c22e ("SELinux: Improve read/write performance") Reported-by: syzbot+a7f7cb0737bd91aa698c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a7f7cb0737bd91aa698c Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions