CVE-2026-138818: misc: tifm: don't clear dev->driver in tifm_device_remove()
In the Linux kernel, the following vulnerability has been resolved:
misc: tifm: don't clear dev->driver in tifmdeviceremove()
tifmdeviceremove() sets sock->dev.driver to NULL after calling the driver's remove() callback. Since commit a995fe1a3aa7 ("rust: driver: drop device private data post unbind"), deviceunbindcleanup() dereferences dev->driver after the bus remove() callback has returned, so removing a card from a TI FlashMedia reader oopses:
BUG: kernel NULL pointer dereference, address: 0000000000000090 Workqueue: tifm tifm7xx1switchmedia [tifm7xx1] RIP: 0010:deviceunbindcleanup+0x16/0xb0 Call Trace: devicereleasedriverinternal+0x220/0x260 devicereleasedriver+0x12/0x20 busremovedevice+0xf9/0x1c0 devicedel+0x161/0x3b0 deviceunregister+0x17/0x70 tifm7xx1switchmedia.cold+0x6b/0xbd [tifm7xx1] processonework+0x1ac/0x3d0 workerthread+0x1b8/0x360 kthread+0xf7/0x130 retfromfork+0x195/0x2a0 retfromforkasm+0x1a/0x30
The driver core clears dev->driver itself in deviceunbindcleanup(), so there is no need for the bus code to do it. Remove the assignment.
The problem was found and the fix written with the help of an AI coding assistant. Tested on a Dell Precision M6500 (TI PCIxx12 FlashMedia, 104c:803b) running a 7.0 kernel: removing an SD card oopsed every time without the fix; with it, insert, read and remove work.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1 - Compensating control
In tifm_device_remove(), remove the assignment that clears sock->dev.driver to NULL.
Event History
Frequently Asked Questions
Which systems are exposed to this failure?
Linux systems using a TI FlashMedia reader are affected when the tifm device removal path is exercised. The reported failure occurs during card removal.
What is required to trigger the issue?
A card must be removed from a TI FlashMedia reader, causing the tifm_7xx1 media-switch workqueue to unregister the device. The fault occurs after the driver's remove callback returns, when the driver core dereferences dev->driver during unbind cleanup.
How can administrators recognize the issue?
Affected systems can oops with a kernel NULL pointer dereference at address 0x90. The stack trace includes device_unbind_cleanup, device_release_driver_internal, bus_remove_device, and tifm_7xx1_switch_media.