Skip to content
OpenAdvisories
Medium · 4.7 CVE-2023-53401 EUVD-2025-29951GHSA-67c3-x939-573c

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

Published Sep 18, 2025 · Updated May 11, 2026 · Assigned by Linux

Vendor: Linux Product: Linux Package: kernel Package: linux Package: linux Package: linux-allwinner-5.19 Package: linux-aws Package: linux-aws-5.0 Package: linux-aws-5.11 Package: linux-aws-5.13 Package: linux-aws-5.15 Package: linux-aws-5.19 Package: linux-aws-5.3 Package: linux-aws-5.8 Package: linux-aws-6.2 Package: linux-aws-6.5 Package: linux-aws-fips Package: linux-azure Package: linux-azure-5.11 Package: linux-azure-5.13 Package: linux-azure-5.15 Package: linux-azure-5.19 Package: linux-azure-5.3 Package: linux-azure-5.8 Package: linux-azure-6.11 Package: linux-azure-6.2 Package: linux-azure-6.5 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.15 Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.2 Package: linux-azure-fips Package: linux-bluefield Package: linux-fips Package: linux-gcp Package: linux-gcp-5.11 Package: linux-gcp-5.13 Package: linux-gcp-5.15 Package: linux-gcp-5.19 Package: linux-gcp-5.3 Package: linux-gcp-5.8 Package: linux-gcp-6.11 Package: linux-gcp-6.2 Package: linux-gcp-6.5 Package: linux-gcp-fips Package: linux-gke Package: linux-gke-4.15 Package: linux-gke-5.15 Package: linux-gke-5.4 Package: linux-gkeop Package: linux-gkeop-5.15 Package: linux-gkeop-5.4 Package: linux-hwe Package: linux-hwe-5.11 Package: linux-hwe-5.13 Package: linux-hwe-5.15 Package: linux-hwe-5.19 Package: linux-hwe-5.8 Package: linux-hwe-6.11 Package: linux-hwe-6.2 Package: linux-hwe-6.5 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.15 Package: linux-intel Package: linux-intel-5.13 Package: linux-intel-iot-realtime Package: linux-intel-iotg Package: linux-intel-iotg-5.15 Package: linux-kvm Package: linux-lowlatency Package: linux-lowlatency-hwe-5.15 Package: linux-lowlatency-hwe-5.19 Package: linux-lowlatency-hwe-6.11 Package: linux-lowlatency-hwe-6.2 Package: linux-lowlatency-hwe-6.5 Package: linux-nvidia Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 Package: linux-nvidia-tegra Package: linux-nvidia-tegra-5.15 Package: linux-nvidia-tegra-igx Package: linux-oem Package: linux-oem-5.10 Package: linux-oem-5.13 Package: linux-oem-5.14 Package: linux-oem-5.17 Package: linux-oem-5.6 Package: linux-oem-6.0 Package: linux-oem-6.1 Package: linux-oem-6.11 Package: linux-oem-6.5 Package: linux-oem-6.8 Package: linux-oracle Package: linux-oracle-5.0 Package: linux-oracle-5.11 Package: linux-oracle-5.13 Package: linux-oracle-5.15 Package: linux-oracle-5.3 Package: linux-oracle-5.8 Package: linux-oracle-6.5 Package: linux-raspi Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime Package: linux-riscv Package: linux-riscv-5.11 Package: linux-riscv-5.15 Package: linux-riscv-5.19 Package: linux-riscv-5.8 Package: linux-riscv-6.5 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-vmware Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Azure Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

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

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

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

==================================================================
BUG: KCSAN: data-race in drain_all_stock / drain_obj_stock

write to 0xffff888237c2a2f8 of 8 bytes by task 19625 on cpu 0:
drain_obj_stock+0x408/0x4e0 mm/memcontrol.c:3306
refill_obj_stock+0x9c/0x1e0 mm/memcontrol.c:3340
obj_cgroup_uncharge+0xe/0x10 mm/memcontrol.c:3408
memcg_slab_free_hook mm/slab.h:587 [inline]
__cache_free mm/slab.c:3373 [inline]
__do_kmem_cache_free mm/slab.c:3577 [inline]
kmem_cache_free+0x105/0x280 mm/slab.c:3602
__d_free fs/dcache.c:298 [inline]
dentry_free fs/dcache.c:375 [inline]
__dentry_kill+0x422/0x4a0 fs/dcache.c:621
dentry_kill+0x8d/0x1e0
dput+0x118/0x1f0 fs/dcache.c:913
__fput+0x3bf/0x570 fs/file_table.c:329
____fput+0x15/0x20 fs/file_table.c:349
task_work_run+0x123/0x160 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xcf/0xe0 kernel/entry/common.c:171
exit_to_user_mode_prepare+0x6a/0xa0 kernel/entry/common.c:203
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:296
do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888237c2a2f8 of 8 bytes by task 19632 on cpu 1:
obj_stock_flush_required mm/memcontrol.c:3319 [inline]
drain_all_stock+0x174/0x2a0 mm/memcontrol.c:2361
try_charge_memcg+0x6d0/0xd10 mm/memcontrol.c:2703
try_charge mm/memcontrol.c:2837 [inline]
mem_cgroup_charge_skmem+0x51/0x140 mm/memcontrol.c:7290
sock_reserve_memory+0xb1/0x390 net/core/sock.c:1025
sk_setsockopt+0x800/0x1e70 net/core/sock.c:1525
udp_lib_setsockopt+0x99/0x6c0 net/ipv4/udp.c:2692
udp_setsockopt+0x73/0xa0 net/ipv4/udp.c:2817
sock_common_setsockopt+0x61/0x70 net/core/sock.c:3668
__sys_setsockopt+0x1c3/0x230 net/socket.c:2271
__do_sys_setsockopt net/socket.c:2282 [inline]
__se_sys_setsockopt net/socket.c:2279 [inline]
__x64_sys_setsockopt+0x66/0x80 net/socket.c:2279
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+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 READ_ONCE()/WRITE_ONCE() for all accesses to
stock->cached_objcg.

Affected products

VendorProductAffectedFixed
Linux Linux 5.9 6.1.45

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 6.4.11-1 —
Debian 13 linux 6.4.11-1 —
Debian 12 linux 6.1.52-1 —
ReleasePackageFixed inAdvisory
Ubuntu Nvidia-BlueField 22.04 LTS linux-bluefield No fix yet —
Ubuntu 24.04 LTS linux-intel +9 No fix yet —
Ubuntu 22.04 LTS linux +49 No fix yet —
Ubuntu 20.04 LTS linux-gke +28 No fix yet —
Ubuntu 18.04 LTS linux-gcp +14 No fix yet —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Ubuntu Pro Realtime 22.04 LTS linux-realtime +1 No fix yet —
Ubuntu Pro FIPS-updates 22.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-preview 22.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro 20.04 LTS linux-aws-5.15 +10 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 bpftool 7.4.0-503.11.1.el9_5 RHSA-2024:9315
RHEL 9 rv +67 5.14.0-503.11.1.el9_5 RHSA-2024:9315
RHEL 8 kernel-rt +12 4.18.0-553.89.1.rt7.430.el8_10 RHSA-2025:22800
RHEL 8 perf +26 4.18.0-553.89.1.el8_10 RHSA-2025:22801
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.4 EUS bpftool 7.3.0-427.97.1.el9_4 RHSA-2025:19886
RHEL 9.4 EUS rv +64 5.14.0-427.97.1.el9_4 RHSA-2025:19886
RHEL 9.2 E4S bpftool 7.0.0-284.146.1.el9_2 RHSA-2025:21051
RHEL 9.2 E4S kernel-rt +14 5.14.0-284.146.1.rt14.431.el9_2 RHSA-2025:21128
RHEL 9.2 E4S perf +47 5.14.0-284.146.1.el9_2 RHSA-2025:21051
RHEL 9.0 E4S kernel-rt +12 5.14.0-70.153.1.rt21.225.el9_0 RHSA-2025:21136
RHEL 9.0 E4S perf +28 5.14.0-70.153.1.el9_0 RHSA-2025:21091
RHEL 8.8 TUS perf +17 4.18.0-477.123.1.el8_8 RHSA-2025:23427
RHEL 8.8 E4S perf +18 4.18.0-477.123.1.el8_8 RHSA-2025:23427
RHEL 8.6 TUS perf +17 4.18.0-372.175.1.el8_6 RHSA-2026:0536
RHEL 8.6 E4S perf +25 4.18.0-372.175.1.el8_6 RHSA-2026:0536
RHEL 8.6 AUS perf +17 4.18.0-372.175.1.el8_6 RHSA-2026:0536
RHEL 8.4 EUS Long Life perf +17 4.18.0-305.183.1.el8_4 RHSA-2026:0533
RHEL 8.4 AUS perf +17 4.18.0-305.183.1.el8_4 RHSA-2026:0533

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 kernel-rt +9 4.18.0-553.89.1.rt7.430.el8_10 ALSA-2025:22800
AlmaLinux 8 perf +24 4.18.0-553.89.1.el8_10 ALSA-2025:22801

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 kernel 4.18.0-553.89.1.el8_10 RLSA-2025:22801
Rocky Linux 8 kernel-rt 4.18.0-553.89.1.rt7.430.el8_10 RLSA-2025:22800
ReleasePackageFixed inAdvisory
SLES 15 SP7 kernel-64kb +6 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1
SLES 15 SP7 kernel-azure +2 6.4.0-150700.20.18.1 SUSE-SU-2025:4132-1
SLES 15 SP7 kernel-default-base 6.4.0-150700.53.22.1.150700.17.15.1 SUSE-SU-2025:4057-1
SLES 15 SP6 kernel-64kb +6 6.4.0-150600.23.73.1 SUSE-SU-2025:03600-1
SLES 15 SP6 kernel-azure +2 6.4.0-150600.8.52.1 SUSE-SU-2025:03634-1
SLES 15 SP6 kernel-default-base 6.4.0-150600.23.73.1.150600.12.32.1 SUSE-SU-2025:03600-1
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Micro 6.1 kernel-default-base 6.4.0-35.1.21.12 SUSE-SU-2025:20861-1
SLE Micro 6.1 kernel-rt +1 6.4.0-37.1 SUSE-SU-2025:20898-1
SLE Micro 6.1 kernel-source +2 6.4.0-35.1 SUSE-SU-2025:20861-1
SLE Micro 6.0 kernel-default-base 6.4.0-35.1.21.12 SUSE-SU-2025:20851-1
SLE Micro 6.0 kernel-rt +1 6.4.0-37.1 SUSE-SU-2025:20870-1
SLE Micro 6.0 kernel-source +2 6.4.0-35.1 SUSE-SU-2025:20851-1
SLE Live Patching 15 SP7 kernel-default 6.4.0-150700.53.22.1 SUSE-SU-2025:4057-1
SLE Live Patching 15 SP7 kernel-livepatch-SLE15-SP7-RT_Update_6 1-150700.1.3.1 SUSE-SU-2025:4141-1
SLE Live Patching 15 SP7 kernel-livepatch-SLE15-SP7_Update_6 1-150700.15.3.1 SUSE-SU-2025:4057-1
SLE Live Patching 15 SP6 kernel-default 6.4.0-150600.23.73.1 SUSE-SU-2025:03600-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_16 1-150600.1.3.1 SUSE-SU-2025:3751-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_16 1-150600.13.3.1 SUSE-SU-2025:03600-1
SUSE Real Time Module 15 SP7 kernel-rt +2 6.4.0-150700.7.22.1 SUSE-SU-2025:4141-1
SUSE Real Time Module 15 SP6 kernel-rt +3 6.4.0-150600.10.55.1 SUSE-SU-2025:3751-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.6 dtb-aarch64 +10 6.4.0-150600.23.73.1 SUSE-SU-2025:03600-1
openSUSE Leap 15.6 kernel-azure +2 6.4.0-150600.8.52.1 SUSE-SU-2025:03634-1
openSUSE Leap 15.6 kernel-default-base 6.4.0-150600.23.73.1.150600.12.32.1 SUSE-SU-2025:03600-1
openSUSE Leap 15.6 kernel-rt +3 6.4.0-150600.10.55.1 SUSE-SU-2025:3751-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 kernel-livepatch-6.1.49-69.116 1.0-0.amzn2023 ALAS2023-2023-330
Amazon Linux 2023 perf +12 6.1.49-69.116.amzn2023 ALAS2023-2023-330

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) kernel No fix yet —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 perf +19 4.18.0-553.89.1.el8_10 ELSA-2025-22801

Advisories 28

References