CVE-2023-53138 json
net: caif: Fix use-after-free in cfusbl_device_notify()
published 2025-05-02 18 mo ago modified 2026-08-05 3 mo ago also EUVD-2025-13119
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 9%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
net: caif: Fix use-after-free in cfusbl_device_notify()
syzbot reported use-after-free in cfusbl_device_notify() [1]. This causes a stack trace like below:
BUG: KASAN: use-after-free in cfusbl_device_notify+0x7c9/0x870 net/caif/caif_usb.c:138 Read of size 8 at addr ffff88807ac4e6f0 by task kworker/u4:6/1214
CPU: 0 PID: 1214 Comm: kworker/u4:6 Not tainted 5.19.0-rc3-syzkaller-00146-g92f20ff72066 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x467 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 cfusbl_device_notify+0x7c9/0x870 net/caif/caif_usb.c:138 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1945 call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers net/core/dev.c:1997 [inline] netdev_wait_allrefs_any net/core/dev.c:10227 [inline] netdev_run_todo+0xbc0/0x10f0 net/core/dev.c:10341 default_device_exit_batch+0x44e/0x590 net/core/dev.c:11334 ops_exit_list+0x125/0x170 net/core/net_namespace.c:167 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:594 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 </TASK>
When unregistering a net device, unregister_netdevice_many_notify() sets the device's reg_state to NETREG_UNREGISTERING, calls notifiers with NETDEV_UNREGISTER, and adds the device to the todo list.
Later on, devices in the todo list are processed by netdev_run_todo(). netdev_run_todo() waits devices' reference count become 1 while rebdoadcasting NETDEV_UNREGISTER notification.
When cfusbl_device_notify() is called with NETDEV_UNREGISTER multiple times, the parent device might be freed. This could cause UAF. Processing NETDEV_UNREGISTER multiple times also causes inbalance of reference count for the module.
This patch fixes the issue by accepting only first NETDEV_UNREGISTER notification.
Patch / fix
- Linux Linux 4.14.310, 4.19.278, 5.4.237, 5.10.175, 5.15.103, 6.1.20, 6.2.7, 6.3
- linux Debian 14, Debian 13, Debian 12 6.1.20-1
debian advisories DEBIAN-CVE-2023-53138
- linux Ubuntu 20.04 LTS 5.4.0-156.173
- linux Ubuntu 22.04 LTS 5.15.0-79.86
- linux-aws Ubuntu 20.04 LTS 5.4.0-1107.115
- linux-aws Ubuntu 22.04 LTS 5.15.0-1042.47
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1110.119
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1039.47
- linux-gke Ubuntu 22.04 LTS 5.15.0-1039.44
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1054.59
ubuntu advisories UBUNTU-CVE-2023-53138
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git.kernel.org/stable/c/68a45c3cf0e2242a533657f4f535d9b6a7447a79 commit
- git.kernel.org/stable/c/1793da97a23e31c5bf06631f3f3e5a25f368fd64 commit
- git.kernel.org/stable/c/9dc16be373b382ddd4c274052a6e870a95e76c01 commit
- git.kernel.org/stable/c/c3aaec463a632cf4187dc017e421bfa69d7834a9 commit
- git.kernel.org/stable/c/3f14457e1584224f4296af613bbd99deb60b5d91 commit
- git.kernel.org/stable/c/287027d8a567168a5d8ce5cb0cba16a34791a48c commit
- git.kernel.org/stable/c/d1a11bbdbb5ea9f172019c5a4a3e9d8eabd72179 commit
- git.kernel.org/stable/c/9781e98a97110f5e76999058368b4be76a788484 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-53138 updated
kernel: net: caif: Fix use-after-free in cfusbl_device_notify()
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.19% chance of exploitation in the next 30 days, higher than 9% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/68a45c3cf0e2242a533657f4f535d9b6a7447a79
patch
-
git.kernel.org
/stable/c/1793da97a23e31c5bf06631f3f3e5a25f368fd64
patch
-
git.kernel.org
/stable/c/9dc16be373b382ddd4c274052a6e870a95e76c01
patch
-
git.kernel.org
/stable/c/c3aaec463a632cf4187dc017e421bfa69d7834a9
patch
-
git.kernel.org
/stable/c/3f14457e1584224f4296af613bbd99deb60b5d91
patch
-
git.kernel.org
/stable/c/287027d8a567168a5d8ce5cb0cba16a34791a48c
patch
-
git.kernel.org
/stable/c/d1a11bbdbb5ea9f172019c5a4a3e9d8eabd72179
patch
-
git.kernel.org
/stable/c/9781e98a97110f5e76999058368b4be76a788484
patch
Sources
- CVE List CVE-2023-53138
- NVD CVE-2023-53138
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.