Cloudanix VulnDB

CVE-2023-52894

None

CVSS

—

EPSS

0.2%

Published

Aug 21, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in Linux kernel USB networking code could make devices crash without warning.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Theoretical
Impact
Denial Of Service
Component
OS kernel
Class
Memory Corruption
Remediation
Patch
Effort
Medium
Patch risk
Low

What it actually does

NULL pointer dereference in ncm_bitrate() when cdev->gadget is NULL during NCM notification handling in usb gadget driver, resulting in kernel panic on access to max_speed field.

Why it matters to the business

Unexpected system crashes on affected Linux-based devices using USB NCM gadget functionality can cause denial of service, operational disruption, and potential data corruption or loss in embedded, mobile, or networking environments.

How an attack unfolds

An attacker triggers ncm_close() leading to ncm_notify() and ncm_do_notify() paths where gadget pointer is unexpectedly NULL; code then attempts to read from NULL->max_speed in ncm_bitrate() causing crash. No public exploitation or threat actor campaigns noted.

How to fix it

Update Linux kernel to commit fef6b29671b66dfb71f17e337c1ad14b5a2cedae or later stable releases containing the fix; rebuild and deploy updated kernel images for affected devices.

How to confirm the fix worked

Verify kernel source includes the referenced commit or test NCM close/notify paths with gadget set to NULL to confirm no dereference occurs; monitor for absence of NULL pointer crashes in logs.

Typical attack path

  1. Establish USB connection using NCM gadget function
  2. Trigger close or notification sequence in f_ncm driver
  3. Force condition where composite device gadget pointer is NULL
  4. Execute ncm_bitrate() dereference leading to kernel panic

How to detect it

Review kernel crash logs and dmesg for NULL pointer dereference at ncm_do_notify or ncm_bitrate addresses; inspect USB gadget initialization sequences for missing gadget pointers.

What your security team should do

  • Prioritize kernel updates on all devices using USB gadget NCM
  • Apply the specific fix commit in custom or downstream kernels
  • Test USB networking functionality post-update to ensure stability
  • Monitor kernel logs for related NULL dereference patterns during USB operations

The record

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_ncm: fix potential NULL ptr deref in ncm_bitrate() In Google internal bug 265639009 we've received an (as yet) unreproducible crash report from an aarch64 GKI 5.10.149-android13 running device. AFAICT the source code is at: https://android.googlesource.com/kernel/common/+/refs/tags/ASB-2022-12-05_13-5.10 The call stack is: ncm_close() -> ncm_notify() -> ncm_do_notify() with the crash at: ncm_do_notify+0x98/0x270 Code: 79000d0b b9000a6c f940012a f9400269 (b9405d4b) Which I believe disassembles to (I don't know ARM assembly, but it looks sane enough to me...): // halfword (16-bit) store presumably to event->wLength (at offset 6 of struct usb_cdc_notification) 0B 0D 00 79 strh w11, [x8, #6] // word (32-bit) store presumably to req->Length (at offset 8 of struct usb_request) 6C 0A 00 B9 str w12, [x19, #8] // x10 (NULL) was read here from offset 0 of valid pointer x9 // IMHO we're reading 'cdev->gadget' and getting NULL // gadget is indeed at offset 0 of struct usb_composite_dev 2A 01 40 F9 ldr x10, [x9] // loading req->buf pointer, which is at offset 0 of struct usb_request 69 02 40 F9 ldr x9, [x19] // x10 is null, crash, appears to be attempt to read cdev->gadget->max_speed 4B 5D 40 B9 ldr w11, [x10, #0x5c] which seems to line up with ncm_do_notify() case NCM_NOTIFY_SPEED code fragment: event->wLength = cpu_to_le16(8); req->length = NCM_STATUS_BYTECOUNT; /* SPEED_CHANGE data is up/down speeds in bits/sec */ data = req->buf + sizeof *event; data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); My analysis of registers and NULL ptr deref crash offset (Unable to handle kernel NULL pointer dereference at virtual address 000000000000005c) heavily suggests that the crash is due to 'cdev->gadget' being NULL when executing: data[0] = cpu_to_le32(ncm_bitrate(cdev->gadget)); which calls: ncm_bitrate(NULL) which then calls: gadget_is_superspeed(NULL) which reads ((struct usb_gadget *)NULL)->max_speed and hits a panic. AFAICT, if I'm counting right, the offset of max_speed is indeed 0x5C. (remember there's a GKI KABI reservation of 16 bytes in struct work_struct) It's not at all clear to me how this is all supposed to work... but returning 0 seems much better than panic-ing...

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 5.10.178-1
Debian:12 linux 0 6.1.8-1
Debian:13 linux 0 6.1.8-1
Linux Kernel 0 4.14.304
Linux Kernel 4.9.0 4.14.304
SUSE:Linux Enterprise High Availability Extension 15 SP4 kernel-default 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Availability Extension 15 SP5 kernel-default 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-64kb 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-default 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-default-base 0 5.14.21-150400.24.133.2.150400.24.64.5
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-docs 0 5.14.21-150400.24.133.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-obs-build 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-source 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS kernel-syms 0 5.14.21-150400.24.133.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-64kb 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-default 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-default-base 0 5.14.21-150400.24.133.2.150400.24.64.5
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-docs 0 5.14.21-150400.24.133.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-obs-build 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-source 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS kernel-syms 0 5.14.21-150400.24.133.1
SUSE:Linux Enterprise Live Patching 15 SP4 kernel-default 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Live Patching 15 SP4 kernel-livepatch-SLE15-SP4_Update_31 0 1-150400.9.3.2
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-default 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-livepatch-SLE15-SP5-RT_Update_19 0 1-150500.11.3.2
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-livepatch-SLE15-SP5_Update_19 0 1-150500.11.3.2
SUSE:Linux Enterprise Micro 5.3 kernel-default 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Micro 5.3 kernel-default-base 0 5.14.21-150400.24.133.2.150400.24.64.5
SUSE:Linux Enterprise Micro 5.3 kernel-rt 0 5.14.21-150400.15.91.3
SUSE:Linux Enterprise Micro 5.3 kernel-source-rt 0 5.14.21-150400.15.91.3
SUSE:Linux Enterprise Micro 5.4 kernel-default 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Micro 5.4 kernel-default-base 0 5.14.21-150400.24.133.2.150400.24.64.5
SUSE:Linux Enterprise Micro 5.4 kernel-rt 0 5.14.21-150400.15.91.3
SUSE:Linux Enterprise Micro 5.4 kernel-source-rt 0 5.14.21-150400.15.91.3
SUSE:Linux Enterprise Micro 5.5 kernel-default 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Micro 5.5 kernel-default-base 0 5.14.21-150500.55.80.2.150500.6.35.6
SUSE:Linux Enterprise Micro 5.5 kernel-rt 0 5.14.21-150500.13.67.3
SUSE:Linux Enterprise Micro 5.5 kernel-source-rt 0 5.14.21-150500.13.67.3
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-64kb 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-default 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-default-base 0 5.14.21-150500.55.80.2.150500.6.35.6
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-source 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-zfcpdump 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-docs 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-obs-build 0 5.14.21-150500.55.80.1
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-source 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-syms 0 5.14.21-150500.55.80.1
SUSE:Linux Enterprise Module for Legacy 15 SP5 kernel-default 0 5.14.21-150500.55.80.2
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-azure 0 5.14.21-150500.33.66.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-source-azure 0 5.14.21-150500.33.66.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-syms-azure 0 5.14.21-150500.33.66.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-64kb 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-default 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-default-base 0 5.14.21-150400.24.133.2.150400.24.64.5
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-docs 0 5.14.21-150400.24.133.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-obs-build 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-source 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-syms 0 5.14.21-150400.24.133.1
SUSE:Linux Enterprise Server 15 SP4-LTSS kernel-zfcpdump 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-default 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-default-base 0 5.14.21-150400.24.133.2.150400.24.64.5
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-docs 0 5.14.21-150400.24.133.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-obs-build 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-source 0 5.14.21-150400.24.133.2
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 kernel-syms 0 5.14.21-150400.24.133.1
SUSE:Linux Enterprise Workstation Extension 15 SP5 kernel-default 0 5.14.21-150500.55.80.2
SUSE:Manager Proxy 4.3 kernel-default 0 5.14.21-150400.24.133.2
SUSE:Manager Proxy 4.3 kernel-default-base 0 5.14.21-150400.24.133.2.150400.24.64.5
SUSE:Manager Proxy 4.3 kernel-source 0 5.14.21-150400.24.133.2
SUSE:Manager Proxy 4.3 kernel-syms 0 5.14.21-150400.24.133.1
SUSE:Manager Server 4.3 kernel-default 0 5.14.21-150400.24.133.2
SUSE:Manager Server 4.3 kernel-default-base 0 5.14.21-150400.24.133.2.150400.24.64.5
SUSE:Manager Server 4.3 kernel-source 0 5.14.21-150400.24.133.2
SUSE:Manager Server 4.3 kernel-syms 0 5.14.21-150400.24.133.1
SUSE:Manager Server 4.3 kernel-zfcpdump 0 5.14.21-150400.24.133.2
SUSE:Real Time Module 15 SP5 kernel-rt 0 5.14.21-150500.13.67.3
SUSE:Real Time Module 15 SP5 kernel-rt_debug 0 5.14.21-150500.13.67.3
SUSE:Real Time Module 15 SP5 kernel-source-rt 0 5.14.21-150500.13.67.3
SUSE:Real Time Module 15 SP5 kernel-syms-rt 0 5.14.21-150500.13.67.1
Ubuntu:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux 0 4.15.0-209.220
Ubuntu:18.04:LTS linux-aws 0 4.15.0-1154.167
Ubuntu:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:18.04:LTS linux-aws-5.4 0 5.4.0-1100.108~18.04.1
Ubuntu:18.04:LTS linux-azure 0 No fix
Ubuntu:18.04:LTS linux-azure-4.15 0 4.15.0-1163.178
Ubuntu:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure-5.4 0 5.4.0-1106.112~18.04.1
Ubuntu:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:18.04:LTS linux-gcp 0 No fix
Ubuntu:18.04:LTS linux-gcp-4.15 0 4.15.0-1148.164
Ubuntu:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:18.04:LTS linux-gcp-5.4 0 5.4.0-1103.112~18.04.1
Ubuntu:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-5.4 0 5.4.0-147.164~18.04.1
Ubuntu:18.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux-ibm-5.4 0 5.4.0-1047.52~18.04.1
Ubuntu:18.04:LTS linux-kvm 0 4.15.0-1138.143
Ubuntu:18.04:LTS linux-oem 0 No fix
Ubuntu:18.04:LTS linux-oracle 0 4.15.0-1117.128
Ubuntu:18.04:LTS linux-oracle-5.0 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.3 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.4 0 5.4.0-1099.108~18.04.1
Ubuntu:18.04:LTS linux-raspi-5.4 0 5.4.0-1083.94~18.04.1
Ubuntu:20.04:LTS linux 0 5.4.0-147.164
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1100.108
Ubuntu:20.04:LTS linux-aws-5.11 0 No fix
Ubuntu:20.04:LTS linux-aws-5.13 0 No fix
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1034.38~20.04.1
Ubuntu:20.04:LTS linux-aws-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1106.112
Ubuntu:20.04:LTS linux-azure-5.11 0 No fix
Ubuntu:20.04:LTS linux-azure-5.13 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1036.43~20.04.1
Ubuntu:20.04:LTS linux-azure-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 5.15.0-1036.43~20.04.1.1
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1062.68
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1103.112
Ubuntu:20.04:LTS linux-gcp-5.11 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.13 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1032.40~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.8 0 No fix
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gke-5.15 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 5.4.0-1067.71
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1018.23~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.11 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.13 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-70.77~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.8 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1047.52
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1033.36~20.04.1
Ubuntu:20.04:LTS linux-intel-5.13 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1030.35~20.04.1
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1017.18
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1089.95
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-70.77~20.04.1
Ubuntu:20.04:LTS linux-nvidia-tegra-5.15 0 5.15.0-1014.14~20.04.1
Ubuntu:20.04:LTS linux-oem-5.10 0 No fix
Ubuntu:20.04:LTS linux-oem-5.13 0 No fix
Ubuntu:20.04:LTS linux-oem-5.14 0 No fix
Ubuntu:20.04:LTS linux-oem-5.6 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1099.108
Ubuntu:20.04:LTS linux-oracle-5.11 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.13 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1033.39~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.8 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1083.94
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.11 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1031.35~20.04.1
Ubuntu:20.04:LTS linux-riscv-5.8 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 5.4.0-1024.28
Ubuntu:22.04:LTS linux 0 5.15.0-70.77
Ubuntu:22.04:LTS linux-allwinner-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws 0 5.15.0-1034.38
Ubuntu:22.04:LTS linux-aws-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws-6.2 0 No fix
Ubuntu:22.04:LTS linux-aws-6.5 0 No fix
Ubuntu:22.04:LTS linux-aws-6.8 0 6.8.0-1009.9~22.04.2
Ubuntu:22.04:LTS linux-azure 0 5.15.0-1036.43
Ubuntu:22.04:LTS linux-azure-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-6.2 0 No fix
Ubuntu:22.04:LTS linux-azure-6.5 0 No fix
Ubuntu:22.04:LTS linux-azure-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-azure-fde 0 5.15.0-1036.43.1
Ubuntu:22.04:LTS linux-azure-fde-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp 0 5.15.0-1032.40
Ubuntu:22.04:LTS linux-gcp-5.19 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.5 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.8 0 6.8.0-1010.11~22.04.1
Ubuntu:22.04:LTS linux-gke 0 5.15.0-1031.36
Ubuntu:22.04:LTS linux-gkeop 0 5.15.0-1018.23
Ubuntu:22.04:LTS linux-hwe-5.19 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.2 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.5 0 No fix
Ubuntu:22.04:LTS linux-hwe-6.8 0 6.8.0-38.38~22.04.1
Ubuntu:22.04:LTS linux-ibm 0 5.15.0-1028.31
Ubuntu:22.04:LTS linux-intel-iot-realtime 0 No fix
Ubuntu:22.04:LTS linux-intel-iotg 0 5.15.0-1028.33
Ubuntu:22.04:LTS linux-kvm 0 5.15.0-1031.36
Ubuntu:22.04:LTS linux-lowlatency 0 5.15.0-70.77
Ubuntu:22.04:LTS linux-lowlatency-hwe-5.19 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.2 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.5 0 No fix
Ubuntu:22.04:LTS linux-lowlatency-hwe-6.8 0 6.8.0-38.38.1~22.04.2
Ubuntu:22.04:LTS linux-nvidia 0 5.15.0-1023.23
Ubuntu:22.04:LTS linux-nvidia-6.2 0 No fix
Ubuntu:22.04:LTS linux-nvidia-6.5 0 6.5.0-1004.4
Ubuntu:22.04:LTS linux-nvidia-6.8 0 6.8.0-1008.8~22.04.1
Ubuntu:22.04:LTS linux-oem-5.17 0 No fix
Ubuntu:22.04:LTS linux-oem-6.0 0 No fix

Related vulnerabilities