Skip to content
CVE PROGRAM SOURCE RECORDUnscored

CVE-2026-143177

memstick: core: don't clear dev->driver in memstick_device_remove()

Description

In the Linux kernel, the following vulnerability has been resolved: memstick: core: don't clear dev->driver in memstick_device_remove() memstick_device_remove() sets card->dev.driver to NULL after calling the driver's remove() callback. Since commit a995fe1a3aa7 ("rust: driver: drop device private data post unbind"), device_unbind_cleanup() dereferences dev->driver after the bus remove() callback has returned, so this should result in a NULL pointer dereference whenever a MemoryStick card is removed or its driver is unbound. The driver core clears dev->driver itself in device_unbind_cleanup(), so there is no need for the bus code to do it. Remove the assignment. This was found by code inspection, with the help of an AI coding assistant, after hitting the same bug in the TI FlashMedia bus code (drivers/misc/tifm_core.c), which oopsed on SD card removal. It has only been compile-tested: no MemoryStick hardware was available.

Affected products

Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.

Linux Linux

Default version status: unaffected

  • a995fe1a3aa78b7d06cc1cc7b6b8436c5e93b07f to < 8365c5aca9f43441968e6cd9d64afc6506619176affected
  • a995fe1a3aa78b7d06cc1cc7b6b8436c5e93b07f to < 6f2b998a52746892968741cbf8fc226985cbf286affected

Linux Linux

Default version status: affected

  • 6.19affected
  • 0 to < 6.19unaffected
  • 7.3.7 to ≤ 7.3.*unaffected
  • 7.4-rc3 to ≤ *unaffected

References