[all-commits] [llvm/llvm-project] 23ead6: [compiler-rt][sanitizer_common] Fix setgroups sysc...
Patrik Dokoupil via All-commits
all-commits at lists.llvm.org
Wed Jul 15 12:54:31 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 23ead65310da314ae04a1c30137f279beaac1a4f
https://github.com/llvm/llvm-project/commit/23ead65310da314ae04a1c30137f279beaac1a4f
Author: Patrik Dokoupil <61749375+pdokoupil at users.noreply.github.com>
Date: 2026-07-15 (Wed, 15 Jul 2026)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc
A compiler-rt/test/msan/Linux/syscalls_setgroups.cpp
Log Message:
-----------
[compiler-rt][sanitizer_common] Fix setgroups syscall pre-hook to check its input (#209207)
# About
`PRE_SYSCALL(setgroups)`/`setgroups16` called `POST_WRITE` on their
`grouplist` argument, but grouplist is a read-only input the kernel
never writes. Under MSan, `POST_WRITE` maps to `__msan_unpoison`, so
annotating a raw setgroups(2) via the documented
`__sanitizer_syscall_pre_setgroups` hook silently marked an
uninitialized group list as initialized -- before the syscall even ran,
and even on failure -- masking a real use-of-uninitialized-value bug.
Under TSan it recorded a write range where a read belongs.
Use PRE_READ, matching every other input-only argument in this file
(e.g. sched_setparam). Add an MSan regression test.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list