GHSA-C75Q-C9M5-VHWR
Vulnerability from github – Published: 2026-12-03 12:31 – Updated: 2026-12-03 12:31In the Linux kernel, the following vulnerability has been resolved:
sched/core: Fix cpuset_mutex double unlock in __sched_setscheduler()
A sched_setattr() with SCHED_FLAG_KEEP_POLICY on a SCHED_DEADLINE task unlocks cpuset_mutex twice if the task's policy changes concurrently:
WARNING: bad unlock balance detected! 7.4.0-rc1 #1 Not tainted
repro/126 is trying to release lock (cpuset_mutex) at: [] __sched_setscheduler+0x9cc/0xc40 but there are no more locks to release! ... Call Trace: print_unlock_imbalance_bug.part.0+0xfb/0x110 lock_release+0x286/0x2e0 __mutex_unlock_slowpath+0x1a/0x400 __sched_setscheduler+0x9cc/0xc40 __x64_sys_sched_setattr+0xa3/0x1b0 do_syscall_64+0x106/0x5f0 entry_SYSCALL_64_after_hwframe+0x77/0x7f
__sched_setscheduler() samples p->policy before taking any lock, and restarts from the recheck label if p->policy differs under the rq lock. The restart drops cpuset_mutex but leaves cpuset_locked set, so a pass that no longer needs the mutex still unlocks it on its way out:
CPU 1 CPU 2 __sched_setscheduler(KEEP_POLICY) policy = p->policy /* DEADLINE / __sched_setscheduler(SCHED_OTHER) p->policy = SCHED_OTHER cpuset_locked = true cpuset_lock() rq = task_rq_lock(p) oldpolicy != p->policy cpuset_unlock() goto recheck / no cpuset_lock() this time */ ... if (cpuset_locked) cpuset_unlock()
Without CONFIG_DEBUG_MUTEXES, or CONFIG_DEBUG_RT_MUTEXES on PREEMPT_RT, nothing warns. The second unlock still clears the owner field regardless of who holds the mutex, so another task can lose cpuset_mutex inside its critical section. Entering SCHED_DEADLINE needs CAP_SYS_NICE, but a racing caller that owns the task does not need it if it samples a policy other than SCHED_DEADLINE.
Clear cpuset_locked when dropping the mutex for the restart. This should be safe because the flag is only tested on the paths leaving the next pass, after that pass has set it again if it took the mutex.
The following program, run as root, reproduces the splat, which no longer appears with this applied. On PREEMPT_RT it crashes the kernel within seconds, which this also fixes:
#define _GNU_SOURCE #include #include #include #include
struct attr { uint32_t size, policy; uint64_t flags; int32_t nice; uint32_t prio; uint64_t runtime, deadline, period; };
static volatile int stop; static volatile pid_t target;
static void set(struct attr a) { a.size = sizeof(a); syscall(SYS_sched_setattr, target, &a, 0); }
static void *sleeper(void *arg) { target = syscall(SYS_gettid); while (!stop) usleep(1000); return arg; }
static void *switcher(void arg) { while (!stop) { / SCHED_DEADLINE, 2us every 1s / set((struct attr){ .policy = 6, .runtime = 2000, .deadline = 1000000000, .period = 1000000000 }); set((struct attr){ .policy = 0 }); / SCHED_OTHER */ } return arg; }
static void *racer(void arg) { / KEEP_POLICY | KEEP_PARAMS */ while (!stop) set((struct attr){ .flags = 0x18 }); return arg; }
int main(void) { pthread_t t[5]; int i;
pthread_create(&t[0], NULL, sleeper, NULL);
while (!target)
usleep(100);
pthread_create(&t[1], NULL, switcher, NULL);
for (i = 2; i < 5; i++)
pthread_create(&t[i], NULL, racer, NULL);
sleep(30);
stop = 1;
for (i = 0; i < 5; i++)
pthread_join(t[i], NULL);
return 0;
}
An LLM helped find the PREEMPT_RT crash and write this patch and its test.
{
"affected": [],
"aliases": [
"CVE-2026-143086"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-12-03T10:17:39Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsched/core: Fix cpuset_mutex double unlock in __sched_setscheduler()\n\nA sched_setattr() with SCHED_FLAG_KEEP_POLICY on a SCHED_DEADLINE task\nunlocks cpuset_mutex twice if the task\u0027s policy changes concurrently:\n\n WARNING: bad unlock balance detected!\n 7.4.0-rc1 #1 Not tainted\n -------------------------------------\n repro/126 is trying to release lock (cpuset_mutex) at:\n [\u003cffffffff9a17cacc\u003e] __sched_setscheduler+0x9cc/0xc40\n but there are no more locks to release!\n ...\n Call Trace:\n print_unlock_imbalance_bug.part.0+0xfb/0x110\n lock_release+0x286/0x2e0\n __mutex_unlock_slowpath+0x1a/0x400\n __sched_setscheduler+0x9cc/0xc40\n __x64_sys_sched_setattr+0xa3/0x1b0\n do_syscall_64+0x106/0x5f0\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n__sched_setscheduler() samples p-\u003epolicy before taking any lock, and\nrestarts from the recheck label if p-\u003epolicy differs under the rq lock.\nThe restart drops cpuset_mutex but leaves cpuset_locked set, so a pass\nthat no longer needs the mutex still unlocks it on its way out:\n\n CPU 1 CPU 2\n __sched_setscheduler(KEEP_POLICY)\n policy = p-\u003epolicy /* DEADLINE */\n __sched_setscheduler(SCHED_OTHER)\n p-\u003epolicy = SCHED_OTHER\n cpuset_locked = true\n cpuset_lock()\n rq = task_rq_lock(p)\n oldpolicy != p-\u003epolicy\n cpuset_unlock()\n goto recheck\n /* no cpuset_lock() this time */\n ...\n if (cpuset_locked)\n cpuset_unlock()\n\nWithout CONFIG_DEBUG_MUTEXES, or CONFIG_DEBUG_RT_MUTEXES on PREEMPT_RT,\nnothing warns. The second unlock still clears the owner field regardless\nof who holds the mutex, so another task can lose cpuset_mutex inside its\ncritical section. Entering SCHED_DEADLINE needs CAP_SYS_NICE, but a\nracing caller that owns the task does not need it if it samples a policy\nother than SCHED_DEADLINE.\n\nClear cpuset_locked when dropping the mutex for the restart. This should be\nsafe because the flag is only tested on the paths leaving the next pass,\nafter that pass has set it again if it took the mutex.\n\nThe following program, run as root, reproduces the splat, which no longer\nappears with this applied. On PREEMPT_RT it crashes the kernel within\nseconds, which this also fixes:\n\n #define _GNU_SOURCE\n #include \u003cpthread.h\u003e\n #include \u003cstdint.h\u003e\n #include \u003csys/syscall.h\u003e\n #include \u003cunistd.h\u003e\n\n struct attr {\n uint32_t size, policy;\n uint64_t flags;\n int32_t nice;\n uint32_t prio;\n uint64_t runtime, deadline, period;\n };\n\n static volatile int stop;\n static volatile pid_t target;\n\n static void set(struct attr a)\n {\n a.size = sizeof(a);\n syscall(SYS_sched_setattr, target, \u0026a, 0);\n }\n\n static void *sleeper(void *arg)\n {\n target = syscall(SYS_gettid);\n while (!stop)\n usleep(1000);\n return arg;\n }\n\n static void *switcher(void *arg)\n {\n while (!stop) {\n /* SCHED_DEADLINE, 2us every 1s */\n set((struct attr){ .policy = 6, .runtime = 2000,\n .deadline = 1000000000,\n .period = 1000000000 });\n set((struct attr){ .policy = 0 }); /* SCHED_OTHER */\n }\n return arg;\n }\n\n static void *racer(void *arg)\n {\n /* KEEP_POLICY | KEEP_PARAMS */\n while (!stop)\n set((struct attr){ .flags = 0x18 });\n return arg;\n }\n\n int main(void)\n {\n pthread_t t[5];\n int i;\n\n pthread_create(\u0026t[0], NULL, sleeper, NULL);\n while (!target)\n usleep(100);\n pthread_create(\u0026t[1], NULL, switcher, NULL);\n for (i = 2; i \u003c 5; i++)\n pthread_create(\u0026t[i], NULL, racer, NULL);\n sleep(30);\n stop = 1;\n for (i = 0; i \u003c 5; i++)\n pthread_join(t[i], NULL);\n return 0;\n }\n\nAn LLM helped find the PREEMPT_RT crash and write this patch and its test.",
"id": "GHSA-c75q-c9m5-vhwr",
"modified": "2026-12-03T12:31:04Z",
"published": "2026-12-03T12:31:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-143086"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/1a681de657bddffbd43d88a592525362404c6e3d"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a87f48135265857af4ae9423963c873292310064"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/cc587b7f9a44b46ba2d531642fb7c3dae72ebfc0"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/f7141257dd67d4936f906a6cfd1d0007721f6898"
}
],
"schema_version": "1.4.0",
"severity": []
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.