CVE-2022-49700
published 2025-02-26CVE-2022-49700: In the Linux kernel, the following vulnerability has been resolved: mm/slub: add missing TID updates on slab deactivation The fastpath in slab_alloc_node()…
PriorityP340high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
EPSS
0.28%
20.3th percentile
In the Linux kernel, the following vulnerability has been resolved:
mm/slub: add missing TID updates on slab deactivation
The fastpath in slab_alloc_node() assumes that c->slab is stable as long as
the TID stays the same. However, two places in __slab_alloc() currently
don't update the TID when deactivating the CPU slab.
If multiple operations race the right way, this could lead to an object
getting lost; or, in an even more unlikely situation, it could even lead to
an object being freed onto the wrong slab's freelist, messing up the
`inuse` counter and eventually causing a page to be freed to the page
allocator while it still contains slab objects.
(I haven't actually tested these cases though, this is just based on
looking at the code. Writing testcases for this stuff seems like it'd be
a pain...)
The race leading to state inconsistency is (all operations on the same CPU
and kmem_cache):
- task A: begin do_slab_free():
- read TID
- read pcpu freelist (==NULL)
- check `slab == c->slab` (true)
- [PREEMPT A->B]
- task B: begin slab_alloc_node():
- fastpath fails (`c->freelist` is NULL)
- enter __slab_alloc()
- slub_get_cpu_ptr() (disables preemption)
- enter ___slab_alloc()
- take local_lock_irqsave()
- read c->freelist as NULL
- get_freelist() returns NULL
- write `c->slab = NULL`
- drop local_unlock_irqrestore()
- goto new_slab
- slub_percpu_partial() is NULL
- get_partial() returns NULL
- slub_put_cpu_ptr() (enables preemption)
- [PREEMPT B->A]
- task A: finish do_slab_free():
- this_cpu_cmpxchg_double() succeeds()
- [CORRUPT STATE: c->slab==NULL, c->freelist!=NULL]
From there, the object on c->freelist will get lost if task B is allowed to
continue from here: It will proceed to the retry_load_slab label,
set c->slab, then jump to load_freelist, which clobbers c->freelist.
But if we instead continue as follows, we get worse corruption:
- task A: run __slab_free() on object from other struct slab:
- CPU_PARTIAL_FREE case (slab was on no list, is now on pcp
Affected
22 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | linux | < linux 5.18.14-1 (bookworm) | linux 5.18.14-1 (bookworm) |
| linux | linux | — | — |
| linux | linux | >= 03e404af26dc2ea0d278d7a342de0aab394793ce < 308c6d0e1f200fd26c71270c6e6bfcf0fc6ff082 | 308c6d0e1f200fd26c71270c6e6bfcf0fc6ff082 |
| linux | linux | >= 03e404af26dc2ea0d278d7a342de0aab394793ce < d6a597450e686d4c6388bd3cdcb17224b4dae7f0 | d6a597450e686d4c6388bd3cdcb17224b4dae7f0 |
| linux | linux | >= 03e404af26dc2ea0d278d7a342de0aab394793ce < e2b2f0e2e34d71ae6c2a1114fd3c525930e84bc7 | e2b2f0e2e34d71ae6c2a1114fd3c525930e84bc7 |
| linux | linux | >= 03e404af26dc2ea0d278d7a342de0aab394793ce < e7e3e90d671078455a3a08189f89d85b3da2de9e | e7e3e90d671078455a3a08189f89d85b3da2de9e |
| linux | linux | >= 03e404af26dc2ea0d278d7a342de0aab394793ce < 6c32496964da0dc230cea763a0e934b2e02dabd5 | 6c32496964da0dc230cea763a0e934b2e02dabd5 |
| linux | linux | >= 03e404af26dc2ea0d278d7a342de0aab394793ce < 0515cc9b6b24877f59b222ade704bfaa42caa2a6 | 0515cc9b6b24877f59b222ade704bfaa42caa2a6 |
| linux | linux | >= 03e404af26dc2ea0d278d7a342de0aab394793ce < 197e257da473c725dfe47759c3ee02f2398d8ea5 | 197e257da473c725dfe47759c3ee02f2398d8ea5 |
| linux | linux | >= 03e404af26dc2ea0d278d7a342de0aab394793ce < eeaa345e128515135ccb864c04482180c08e3259 | eeaa345e128515135ccb864c04482180c08e3259 |
| linux | linux_kernel | — | — |
| linux | linux_kernel | >= 0 < 5.10.136-1 | 5.10.136-1 |
| linux | linux_kernel | >= 0 < 5.18.14-1 | 5.18.14-1 |
| linux | linux_kernel | >= 0 < 5.18.14-1 | 5.18.14-1 |
| linux | linux_kernel | >= 0 < 5.18.14-1 | 5.18.14-1 |
| linux | linux_kernel | >= 3.1 < 4.9.323 | 4.9.323 |
| linux | linux_kernel | >= 4.10 < 4.14.288 | 4.14.288 |
| linux | linux_kernel | >= 4.15 < 4.19.252 | 4.19.252 |
| linux | linux_kernel | >= 4.20 < 5.4.205 | 5.4.205 |
| linux | linux_kernel | >= 5.11 < 5.15.54 | 5.15.54 |
| linux | linux_kernel | >= 5.16 < 5.18.8 | 5.18.8 |
| linux | linux_kernel | >= 5.5 < 5.10.130 | 5.10.130 |
CVSS provenance
nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
osv7.8HIGH
vendor_debian7.8HIGH
vendor_redhat7.8HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
GHSA-p247-4v6m-f77m: In the Linux kernel, the following vulnerability has been resolved:
mm/slub: add missing TID updates on slab deactivation
The fastpath in slab_alloc
ghsa_unreviewed·2025-02-27
CVE-2022-49700 [HIGH] CWE-416 GHSA-p247-4v6m-f77m: In the Linux kernel, the following vulnerability has been resolved:
mm/slub: add missing TID updates on slab deactivation
The fastpath in slab_alloc
In the Linux kernel, the following vulnerability has been resolved:
mm/slub: add missing TID updates on slab deactivation
The fastpath in slab_alloc_node() assumes that c->slab is stable as long as
the TID stays the same. However, two places in __slab_alloc() currently
don't update the TID when deactivating the CPU slab.
If multiple operations race the right way, this could lead to an object
getting lost; or, in an even more unlikely situation, it could even lead to
an object being freed onto the wrong slab's freelist, messing up the
`inuse` counter and eventually causing a page to be freed to the page
allocator while it still contains slab objects.
(I haven't actually tested these cases though, this is just based on
looking at the code. Writing testcases for this stuff seems like it'd
OSV
CVE-2022-49700: In the Linux kernel, the following vulnerability has been resolved: mm/slub: add missing TID updates on slab deactivation The fastpath in slab_alloc_n
osv·2025-02-26·CVSS 7.8
CVE-2022-49700 [HIGH] CVE-2022-49700: In the Linux kernel, the following vulnerability has been resolved: mm/slub: add missing TID updates on slab deactivation The fastpath in slab_alloc_n
In the Linux kernel, the following vulnerability has been resolved: mm/slub: add missing TID updates on slab deactivation The fastpath in slab_alloc_node() assumes that c->slab is stable as long as the TID stays the same. However, two places in __slab_alloc() currently don't update the TID when deactivating the CPU slab. If multiple operations race the right way, this could lead to an object getting lost; or, in an even more unlikely situation, it could even lead to an object being freed onto the wrong slab's freelist, messing up the `inuse` counter and eventually causing a page to be freed to the page allocator while it still contains slab objects. (I haven't actually tested these cases though, this is just based on looking at the code. Writing testcases for this stuff seems like it'd be
Red Hat
kernel: mm/slub: add missing TID updates on slab deactivation
vendor_redhat·2025-02-26·CVSS 7.8
CVE-2022-49700 [HIGH] kernel: mm/slub: add missing TID updates on slab deactivation
kernel: mm/slub: add missing TID updates on slab deactivation
In the Linux kernel, the following vulnerability has been resolved:
mm/slub: add missing TID updates on slab deactivation
The fastpath in slab_alloc_node() assumes that c->slab is stable as long as
the TID stays the same. However, two places in __slab_alloc() currently
don't update the TID when deactivating the CPU slab.
If multiple operations race the right way, this could lead to an object
getting lost; or, in an even more unlikely situation, it could even lead to
an object being freed onto the wrong slab's freelist, messing up the
`inuse` counter and eventually causing a page to be freed to the page
allocator while it still contains slab objects.
(I haven't actually tested these cases though, this is just based on
looking at
Debian
CVE-2022-49700: linux - In the Linux kernel, the following vulnerability has been resolved: mm/slub: ad...
vendor_debian·2022·CVSS 7.8
CVE-2022-49700 [HIGH] CVE-2022-49700: linux - In the Linux kernel, the following vulnerability has been resolved: mm/slub: ad...
In the Linux kernel, the following vulnerability has been resolved: mm/slub: add missing TID updates on slab deactivation The fastpath in slab_alloc_node() assumes that c->slab is stable as long as the TID stays the same. However, two places in __slab_alloc() currently don't update the TID when deactivating the CPU slab. If multiple operations race the right way, this could lead to an object getting lost; or, in an even more unlikely situation, it could even lead to an object being freed onto the wrong slab's freelist, messing up the `inuse` counter and eventually causing a page to be freed to the page allocator while it still contains slab objects. (I haven't actually tested these cases though, this is just based on looking at the code. Writing testcases for this stuff seems like it'd be
No detection rules found.
No public exploits indexed.
https://git.kernel.org/stable/c/0515cc9b6b24877f59b222ade704bfaa42caa2a6https://git.kernel.org/stable/c/197e257da473c725dfe47759c3ee02f2398d8ea5https://git.kernel.org/stable/c/308c6d0e1f200fd26c71270c6e6bfcf0fc6ff082https://git.kernel.org/stable/c/6c32496964da0dc230cea763a0e934b2e02dabd5https://git.kernel.org/stable/c/d6a597450e686d4c6388bd3cdcb17224b4dae7f0https://git.kernel.org/stable/c/e2b2f0e2e34d71ae6c2a1114fd3c525930e84bc7https://git.kernel.org/stable/c/e7e3e90d671078455a3a08189f89d85b3da2de9ehttps://git.kernel.org/stable/c/eeaa345e128515135ccb864c04482180c08e3259
2025-02-26
Published