CVE-2023-53401: mm: kmem: fix a NULL pointer dereference in obj_stock_flush_required()

Published Sep 18, 2025
·
Updated

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

mm: kmem: fix a NULL pointer dereference in objstockflushrequired()

KCSAN found an issue in objstockflushrequired(): stock->cachedobjcg can be reset between the check and dereference:

================================================================== BUG: KCSAN: data-race in drainallstock / drainobjstock

write to 0xffff888237c2a2f8 of 8 bytes by task 19625 on cpu 0: drainobjstock+0x408/0x4e0 mm/memcontrol.c:3306 refillobjstock+0x9c/0x1e0 mm/memcontrol.c:3340 objcgroupuncharge+0xe/0x10 mm/memcontrol.c:3408 memcgslabfreehook mm/slab.h:587 [inline] cachefree mm/slab.c:3373 [inline] dokmemcachefree mm/slab.c:3577 [inline] kmemcachefree+0x105/0x280 mm/slab.c:3602 dfree fs/dcache.c:298 [inline] dentryfree fs/dcache.c:375 [inline] dentrykill+0x422/0x4a0 fs/dcache.c:621 dentrykill+0x8d/0x1e0 dput+0x118/0x1f0 fs/dcache.c:913 fput+0x3bf/0x570 fs/filetable.c:329 fput+0x15/0x20 fs/filetable.c:349 taskworkrun+0x123/0x160 kernel/taskwork.c:179 resumeusermodework include/linux/resumeusermode.h:49 [inline] exittousermodeloop+0xcf/0xe0 kernel/entry/common.c:171 exittousermodeprepare+0x6a/0xa0 kernel/entry/common.c:203 syscallexittousermodework kernel/entry/common.c:285 [inline] syscallexittousermode+0x26/0x140 kernel/entry/common.c:296 dosyscall64+0x4d/0xc0 arch/x86/entry/common.c:86 entrySYSCALL64afterhwframe+0x63/0xcd

read to 0xffff888237c2a2f8 of 8 bytes by task 19632 on cpu 1: objstockflushrequired mm/memcontrol.c:3319 [inline] drainallstock+0x174/0x2a0 mm/memcontrol.c:2361 trychargememcg+0x6d0/0xd10 mm/memcontrol.c:2703 trycharge mm/memcontrol.c:2837 [inline] memcgroupchargeskmem+0x51/0x140 mm/memcontrol.c:7290 sockreservememory+0xb1/0x390 net/core/sock.c:1025 sksetsockopt+0x800/0x1e70 net/core/sock.c:1525 udplibsetsockopt+0x99/0x6c0 net/ipv4/udp.c:2692 udpsetsockopt+0x73/0xa0 net/ipv4/udp.c:2817 sockcommonsetsockopt+0x61/0x70 net/core/sock.c:3668 syssetsockopt+0x1c3/0x230 net/socket.c:2271 dosyssetsockopt net/socket.c:2282 [inline] sesyssetsockopt net/socket.c:2279 [inline] x64syssetsockopt+0x66/0x80 net/socket.c:2279 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x41/0xc0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd

value changed: 0xffff8881382d52c0 -> 0xffff888138893740

Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 19632 Comm: syz-executor.0 Not tainted 6.3.0-rc2-syzkaller-00387-g534293368afa #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023

Fix it by using READONCE()/WRITEONCE() for all accesses to stock->cachedobjcg.

Affected Software

4 affected components
Linux Linux kernel
Microsoft cbl2 kernel 5.15.186.1-1
Linux Linux kernel>=5.9<6.1.45
Linux Linux kernel>=6.2<6.4.10

Event History

Sep 18, 2025
CVE Published
via MITRE·01:33 PM
Data Sourced
via MITRE·01:33 PM
Description
Data Sourced
via Red Hat·02:03 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Dec 13, 2025
Data Sourced
via Microsoft·01:01 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2023-53401?

The severity of CVE-2023-53401 is categorized as high due to the potential for a NULL pointer dereference in the Linux kernel.

2

How do I fix CVE-2023-53401?

To fix CVE-2023-53401, update the Linux kernel to the latest version that includes the patch for this vulnerability.

3

What is affected by CVE-2023-53401?

CVE-2023-53401 affects the Linux kernel and can impact systems that run this kernel version.

4

What impact does CVE-2023-53401 have on systems?

CVE-2023-53401 can lead to system crashes or instability due to the NULL pointer dereference.

5

Is CVE-2023-53401 actively exploited in the wild?

As of now, there is no public indication that CVE-2023-53401 is actively exploited in the wild.

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