In the Linux kernel, the following vulnerability has been resolved:
sched_ext: Fix incorrect autogroup migration detection
scxmovetask() is called from schedmovetask() and tells the BPF scheduler that cgroup migration is being committed. schedmovetask() is used by both cgroup and autogroup migrations and scxmovetask() tried to filter out autogroup migrations by testing the destination cgroup and PFEXITING but this is not enough. In fact, without explicitly tagging the thread which is doing the cgroup migration, there is no good way to tell apart scxmove_task() invocations for racing migration to the root cgroup and an autogroup migration.
This led to scxmovetask() incorrectly ignoring a migration from non-root cgroup to an autogroup of the root cgroup triggering the following warning:
WARNING: CPU: 7 PID: 1 at kernel/sched/ext.c:3725 scxcgroupcanattach+0x196/0x340 ... Call Trace: <TASK> cgroupmigrateexecute+0x5b1/0x700 cgroupattachtask+0x296/0x400 _cgroupprocswrite+0x128/0x140 cgroupprocswrite+0x17/0x30 kernfsfopwriteiter+0x141/0x1f0 vfswrite+0x31d/0x4a0 _x64syswrite+0x72/0xf0 dosyscall64+0x82/0x160 entrySYSCALL64after_hwframe+0x76/0x7e
Fix it by adding an argument to schedmovetask() that indicates whether the moving is for a cgroup or autogroup migration. After the change, scxmovetask() is called only for cgroup migrations and renamed to scxcgroupmove_task().