{"api_version":"1","generated_at":"2026-11-20T07:29:57+00:00","cve":"CVE-2026-99697","urls":{"html":"https://cve.report/CVE-2026-99697","api":"https://cve.report/api/cve/CVE-2026-99697.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99697","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99697"},"summary":{"title":"mm: memcontrol: fix NULL pointer deref and UAF from high_work_func() on dying memcg","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: memcontrol: fix NULL pointer deref and UAF from high_work_func() on dying memcg\n\nWhen memory.high is exceeded in non-task context, try_charge_memcg()\nschedules memcg->high_work without taking a reference on the memcg, and\nhigh_work_func() invokes reclaim_high() without pinning the memcg.\n\nWith obj_cgroup reparenting, introduced in commit bf4f059954dc (\"mm:\nmemcg/slab: obj_cgroup API\"), objects charged to a child memcg are\nreparented to its parent in mem_cgroup_css_offline() instead of holding a\nreference on the child until uncharged.  Subsequent uncharges of those\nobjects go to the parent, which can leave the child's memory use\npermanently above its high limit, so any later charge on the offlined\nmemcg in non-task context schedules high_work.  This was later widened\nfrom kernel memory to LRU folios when commit f1cf8d2f36dc (\"mm:\nmemcontrol: eliminate the problem of dying memory cgroup for LRU folios\")\nconverted LRU folios to use obj_cgroup reparenting.\n\ncancel_work_sync(&memcg->high_work) only runs at the end of teardown in\nmem_cgroup_css_free(), so high_work_func() can start or still be running\nreclaim_high() after mem_cgroup_css_released() or shrink_many() has called\nlru_gen_release_memcg() and unhashed lruvec->lrugen.list.  If reclaim\ntries to rotate the memcg, lru_gen_rotate_memcg() dereferences a NULL\npprev pointer.  This issue is specific to MGLRU and was introduced with\nthe memcg LRU in commit e4dde56cd208 (\"mm: multi-gen LRU: per-node\nlru_gen_folio lists\").\n\nWith either traditional LRU or MGLRU, css_free_rwork_fn() calls\ncss_rstat_exit() which frees per-CPU rstat data before calling\nmem_cgroup_css_free().  If reclaim_high() is still running, rstat updates\nvia mod_lruvec_state() -> __css_rstat_updated() cause a use-after-free on\nthe per-CPU rstat data.  This was introduced when commit 5da3bfa029d6\n(\"cgroup: use separate rstat trees for each subsystem\") moved\ncss_rstat_exit() ahead of ss->css_free().\n\nFix both problems by acquiring a reference with css_tryget_online() in\nhigh_work_func() before calling reclaim_high(), and by resetting\nmemory.high and swap.high to PAGE_COUNTER_MAX in mem_cgroup_css_offline()\nso that charges via references on an offlined memcg do not trigger\nhigh_work on the dead child and skip checking live ancestors in\ntry_charge_memcg().\n\nAcquiring the reference in high_work_func() rather than before scheduling\nhigh_work is safe because mem_cgroup_css_free() calls irq_work_sync() and\ncancel_work_sync() which cancels pending work and waits for an already\nrunning high_work_func() to complete before mem_cgroup_free() frees the\nmemcg.  css_tryget_online() uses percpu_ref_tryget_live() and is safe to\ncall after percpu_ref_exit() before the cgroup is freed unlike\ncss_tryget().\n\nOops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI\nKASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]\nCPU: 1 UID: 0 PID: 27 Comm: kworker/1:0 Tainted: G    B   W           7.3.0-rc5-g2bba28e98578 #284 PREEMPT(full)\nTainted: [B]=BAD_PAGE, [W]=WARN  <-- Taint from lru_gen_rotate_memcg() VM_WARN_ON_ONCE\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014\nWorkqueue: events high_work_func\nRIP: 0010:lru_gen_rotate_memcg+0x1a3/0xe90\nCall Trace:\n <TASK>\n ? read_ctrl_pos+0x22f/0x3f0\n shrink_lruvec+0x16cb/0x1b80\n ? ret_from_fork_asm+0x1a/0x30\n ? lapic_next_event+0x15/0x20\n ? clockevents_program_event+0x2bb/0x6f0\n ? lapic_next_event+0x15/0x20\n ? __pfx_shrink_lruvec+0x10/0x10\n ? __pfx_clockevents_program_event+0x10/0x10\n ? _raw_spin_lock+0x84/0xe0\n ? __pfx__raw_spin_lock+0x10/0x10\n ? kasan_save_stack+0x30/0x50\n ? psi_group_change+0x381/0x740\n ? __pfx_sched_clock_cpu+0x10/0x10\n ? save_fpregs_to_fpstate+0xc4/0x2c0\n ? finish_task_switch.isra.0+0x1de/0xac0\n ? __schedule+0xf62/0x42c0\n ? __pfx___schedule+0x10/0x10\n ? __pfx___irq_work_queue_lo\n---truncated---","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-20 06:18:05","updated_at":"2026-11-20 06:18:05"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/a44855f25821082e384503abf01a45a5c65a80de","name":"https://git.kernel.org/stable/c/a44855f25821082e384503abf01a45a5c65a80de","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/dd94d8c7660a60dbfcd425e0d10120de6d02a7bd","name":"https://git.kernel.org/stable/c/dd94d8c7660a60dbfcd425e0d10120de6d02a7bd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/b558ac673e65b4f302f105a0d9f79fb7cf012330","name":"https://git.kernel.org/stable/c/b558ac673e65b4f302f105a0d9f79fb7cf012330","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/301ac490daf619b8affe12b07e2d68c99adcda79","name":"https://git.kernel.org/stable/c/301ac490daf619b8affe12b07e2d68c99adcda79","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99697","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99697","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc a44855f25821082e384503abf01a45a5c65a80de git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc 301ac490daf619b8affe12b07e2d68c99adcda79 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc b558ac673e65b4f302f105a0d9f79fb7cf012330 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e4dde56cd208674ce899b47589f263499e5b8cdc dd94d8c7660a60dbfcd425e0d10120de6d02a7bd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.3","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.3 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.118 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.64 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.5 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/memcontrol.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"a44855f25821082e384503abf01a45a5c65a80de","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"},{"lessThan":"301ac490daf619b8affe12b07e2d68c99adcda79","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"},{"lessThan":"b558ac673e65b4f302f105a0d9f79fb7cf012330","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"},{"lessThan":"dd94d8c7660a60dbfcd425e0d10120de6d02a7bd","status":"affected","version":"e4dde56cd208674ce899b47589f263499e5b8cdc","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/memcontrol.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.3"},{"lessThan":"6.3","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.118","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.64","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.118","versionStartIncluding":"6.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.64","versionStartIncluding":"6.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.5","versionStartIncluding":"6.3","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"6.3","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: memcontrol: fix NULL pointer deref and UAF from high_work_func() on dying memcg\n\nWhen memory.high is exceeded in non-task context, try_charge_memcg()\nschedules memcg->high_work without taking a reference on the memcg, and\nhigh_work_func() invokes reclaim_high() without pinning the memcg.\n\nWith obj_cgroup reparenting, introduced in commit bf4f059954dc (\"mm:\nmemcg/slab: obj_cgroup API\"), objects charged to a child memcg are\nreparented to its parent in mem_cgroup_css_offline() instead of holding a\nreference on the child until uncharged.  Subsequent uncharges of those\nobjects go to the parent, which can leave the child's memory use\npermanently above its high limit, so any later charge on the offlined\nmemcg in non-task context schedules high_work.  This was later widened\nfrom kernel memory to LRU folios when commit f1cf8d2f36dc (\"mm:\nmemcontrol: eliminate the problem of dying memory cgroup for LRU folios\")\nconverted LRU folios to use obj_cgroup reparenting.\n\ncancel_work_sync(&memcg->high_work) only runs at the end of teardown in\nmem_cgroup_css_free(), so high_work_func() can start or still be running\nreclaim_high() after mem_cgroup_css_released() or shrink_many() has called\nlru_gen_release_memcg() and unhashed lruvec->lrugen.list.  If reclaim\ntries to rotate the memcg, lru_gen_rotate_memcg() dereferences a NULL\npprev pointer.  This issue is specific to MGLRU and was introduced with\nthe memcg LRU in commit e4dde56cd208 (\"mm: multi-gen LRU: per-node\nlru_gen_folio lists\").\n\nWith either traditional LRU or MGLRU, css_free_rwork_fn() calls\ncss_rstat_exit() which frees per-CPU rstat data before calling\nmem_cgroup_css_free().  If reclaim_high() is still running, rstat updates\nvia mod_lruvec_state() -> __css_rstat_updated() cause a use-after-free on\nthe per-CPU rstat data.  This was introduced when commit 5da3bfa029d6\n(\"cgroup: use separate rstat trees for each subsystem\") moved\ncss_rstat_exit() ahead of ss->css_free().\n\nFix both problems by acquiring a reference with css_tryget_online() in\nhigh_work_func() before calling reclaim_high(), and by resetting\nmemory.high and swap.high to PAGE_COUNTER_MAX in mem_cgroup_css_offline()\nso that charges via references on an offlined memcg do not trigger\nhigh_work on the dead child and skip checking live ancestors in\ntry_charge_memcg().\n\nAcquiring the reference in high_work_func() rather than before scheduling\nhigh_work is safe because mem_cgroup_css_free() calls irq_work_sync() and\ncancel_work_sync() which cancels pending work and waits for an already\nrunning high_work_func() to complete before mem_cgroup_free() frees the\nmemcg.  css_tryget_online() uses percpu_ref_tryget_live() and is safe to\ncall after percpu_ref_exit() before the cgroup is freed unlike\ncss_tryget().\n\nOops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI\nKASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]\nCPU: 1 UID: 0 PID: 27 Comm: kworker/1:0 Tainted: G    B   W           7.3.0-rc5-g2bba28e98578 #284 PREEMPT(full)\nTainted: [B]=BAD_PAGE, [W]=WARN  <-- Taint from lru_gen_rotate_memcg() VM_WARN_ON_ONCE\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014\nWorkqueue: events high_work_func\nRIP: 0010:lru_gen_rotate_memcg+0x1a3/0xe90\nCall Trace:\n <TASK>\n ? read_ctrl_pos+0x22f/0x3f0\n shrink_lruvec+0x16cb/0x1b80\n ? ret_from_fork_asm+0x1a/0x30\n ? lapic_next_event+0x15/0x20\n ? clockevents_program_event+0x2bb/0x6f0\n ? lapic_next_event+0x15/0x20\n ? __pfx_shrink_lruvec+0x10/0x10\n ? __pfx_clockevents_program_event+0x10/0x10\n ? _raw_spin_lock+0x84/0xe0\n ? __pfx__raw_spin_lock+0x10/0x10\n ? kasan_save_stack+0x30/0x50\n ? psi_group_change+0x381/0x740\n ? __pfx_sched_clock_cpu+0x10/0x10\n ? save_fpregs_to_fpstate+0xc4/0x2c0\n ? finish_task_switch.isra.0+0x1de/0xac0\n ? __schedule+0xf62/0x42c0\n ? __pfx___schedule+0x10/0x10\n ? __pfx___irq_work_queue_lo\n---truncated---"}],"providerMetadata":{"dateUpdated":"2026-11-20T05:50:40.353Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/a44855f25821082e384503abf01a45a5c65a80de"},{"url":"https://git.kernel.org/stable/c/301ac490daf619b8affe12b07e2d68c99adcda79"},{"url":"https://git.kernel.org/stable/c/b558ac673e65b4f302f105a0d9f79fb7cf012330"},{"url":"https://git.kernel.org/stable/c/dd94d8c7660a60dbfcd425e0d10120de6d02a7bd"}],"title":"mm: memcontrol: fix NULL pointer deref and UAF from high_work_func() on dying memcg","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99697","datePublished":"2026-11-20T05:50:40.353Z","dateReserved":"2026-09-25T10:25:14.429Z","dateUpdated":"2026-11-20T05:50:40.353Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-20 06:18:05","lastModifiedDate":"2026-11-20 06:18:05","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99697","Ordinal":"1","Title":"mm: memcontrol: fix NULL pointer deref and UAF from high_work_fu","CVE":"CVE-2026-99697","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99697","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: memcontrol: fix NULL pointer deref and UAF from high_work_func() on dying memcg\n\nWhen memory.high is exceeded in non-task context, try_charge_memcg()\nschedules memcg->high_work without taking a reference on the memcg, and\nhigh_work_func() invokes reclaim_high() without pinning the memcg.\n\nWith obj_cgroup reparenting, introduced in commit bf4f059954dc (\"mm:\nmemcg/slab: obj_cgroup API\"), objects charged to a child memcg are\nreparented to its parent in mem_cgroup_css_offline() instead of holding a\nreference on the child until uncharged.  Subsequent uncharges of those\nobjects go to the parent, which can leave the child's memory use\npermanently above its high limit, so any later charge on the offlined\nmemcg in non-task context schedules high_work.  This was later widened\nfrom kernel memory to LRU folios when commit f1cf8d2f36dc (\"mm:\nmemcontrol: eliminate the problem of dying memory cgroup for LRU folios\")\nconverted LRU folios to use obj_cgroup reparenting.\n\ncancel_work_sync(&memcg->high_work) only runs at the end of teardown in\nmem_cgroup_css_free(), so high_work_func() can start or still be running\nreclaim_high() after mem_cgroup_css_released() or shrink_many() has called\nlru_gen_release_memcg() and unhashed lruvec->lrugen.list.  If reclaim\ntries to rotate the memcg, lru_gen_rotate_memcg() dereferences a NULL\npprev pointer.  This issue is specific to MGLRU and was introduced with\nthe memcg LRU in commit e4dde56cd208 (\"mm: multi-gen LRU: per-node\nlru_gen_folio lists\").\n\nWith either traditional LRU or MGLRU, css_free_rwork_fn() calls\ncss_rstat_exit() which frees per-CPU rstat data before calling\nmem_cgroup_css_free().  If reclaim_high() is still running, rstat updates\nvia mod_lruvec_state() -> __css_rstat_updated() cause a use-after-free on\nthe per-CPU rstat data.  This was introduced when commit 5da3bfa029d6\n(\"cgroup: use separate rstat trees for each subsystem\") moved\ncss_rstat_exit() ahead of ss->css_free().\n\nFix both problems by acquiring a reference with css_tryget_online() in\nhigh_work_func() before calling reclaim_high(), and by resetting\nmemory.high and swap.high to PAGE_COUNTER_MAX in mem_cgroup_css_offline()\nso that charges via references on an offlined memcg do not trigger\nhigh_work on the dead child and skip checking live ancestors in\ntry_charge_memcg().\n\nAcquiring the reference in high_work_func() rather than before scheduling\nhigh_work is safe because mem_cgroup_css_free() calls irq_work_sync() and\ncancel_work_sync() which cancels pending work and waits for an already\nrunning high_work_func() to complete before mem_cgroup_free() frees the\nmemcg.  css_tryget_online() uses percpu_ref_tryget_live() and is safe to\ncall after percpu_ref_exit() before the cgroup is freed unlike\ncss_tryget().\n\nOops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI\nKASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]\nCPU: 1 UID: 0 PID: 27 Comm: kworker/1:0 Tainted: G    B   W           7.3.0-rc5-g2bba28e98578 #284 PREEMPT(full)\nTainted: [B]=BAD_PAGE, [W]=WARN  <-- Taint from lru_gen_rotate_memcg() VM_WARN_ON_ONCE\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014\nWorkqueue: events high_work_func\nRIP: 0010:lru_gen_rotate_memcg+0x1a3/0xe90\nCall Trace:\n <TASK>\n ? read_ctrl_pos+0x22f/0x3f0\n shrink_lruvec+0x16cb/0x1b80\n ? ret_from_fork_asm+0x1a/0x30\n ? lapic_next_event+0x15/0x20\n ? clockevents_program_event+0x2bb/0x6f0\n ? lapic_next_event+0x15/0x20\n ? __pfx_shrink_lruvec+0x10/0x10\n ? __pfx_clockevents_program_event+0x10/0x10\n ? _raw_spin_lock+0x84/0xe0\n ? __pfx__raw_spin_lock+0x10/0x10\n ? kasan_save_stack+0x30/0x50\n ? psi_group_change+0x381/0x740\n ? __pfx_sched_clock_cpu+0x10/0x10\n ? save_fpregs_to_fpstate+0xc4/0x2c0\n ? finish_task_switch.isra.0+0x1de/0xac0\n ? __schedule+0xf62/0x42c0\n ? __pfx___schedule+0x10/0x10\n ? __pfx___irq_work_queue_lo\n---truncated---","Type":"Description","Title":"mm: memcontrol: fix NULL pointer deref and UAF from high_work_fu"}]}}}