CVE-2025-21771: sched_ext: Fix incorrect autogroup migration detection

Published Feb 27, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

schedext: 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 scxmovetask() 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 entrySYSCALL64afterhwframe+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 scxcgroupmovetask().

Affected Software

5 affected components
Linux Kernel
Linux Linux kernel>=6.12<6.12.16
Linux Linux kernel>=6.13<6.13.4
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2

Event History

Feb 27, 2025
CVE Published
via MITRE·02:18 AM
Data Sourced
via MITRE·02:18 AM
Description
Data Sourced
via Red Hat·03:05 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·03:15 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-21771?

CVE-2025-21771 is considered to be a medium severity vulnerability due to its impact on task migration in the Linux kernel.

2

How do I fix CVE-2025-21771?

To fix CVE-2025-21771, you should update to the latest stable version of the Linux kernel where the vulnerability has been patched.

3

What systems are affected by CVE-2025-21771?

CVE-2025-21771 affects all versions of the Linux kernel that utilize cgroup and the BPF scheduler.

4

What are the consequences of CVE-2025-21771?

The consequences of CVE-2025-21771 include potential issues with task scheduling and resource allocation due to improper detection of autogroup migration.

5

Is there a workaround for CVE-2025-21771?

Currently, the recommended approach is to apply the official patch rather than relying on a workaround for CVE-2025-21771.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203