{"id":"CVE-2026-138818","aliases":["CVE-2026-138818"],"related":[],"kind":"vulnerability","state":"published","title":"misc: tifm: don't clear dev->driver in tifm_device_remove()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmisc: tifm: don't clear dev->driver in tifm_device_remove()\n\ntifm_device_remove() sets sock->dev.driver to NULL after calling the\ndriver's remove() callback. Since commit a995fe1a3aa7 (\"rust: driver:\ndrop device private data post unbind\"), device_unbind_cleanup()\ndereferences dev->driver after the bus remove() callback has returned,\nso removing a card from a TI FlashMedia reader oopses:\n\n  BUG: kernel NULL pointer dereference, address: 0000000000000090\n  Workqueue: tifm tifm_7xx1_switch_media [tifm_7xx1]\n  RIP: 0010:device_unbind_cleanup+0x16/0xb0\n  Call Trace:\n   device_release_driver_internal+0x220/0x260\n   device_release_driver+0x12/0x20\n   bus_remove_device+0xf9/0x1c0\n   device_del+0x161/0x3b0\n   device_unregister+0x17/0x70\n   tifm_7xx1_switch_media.cold+0x6b/0xbd [tifm_7xx1]\n   process_one_work+0x1ac/0x3d0\n   worker_thread+0x1b8/0x360\n   kthread+0xf7/0x130\n   ret_from_fork+0x195/0x2a0\n   ret_from_fork_asm+0x1a/0x30\n\nThe driver core clears dev->driver itself in device_unbind_cleanup(), so\nthere is no need for the bus code to do it. Remove the assignment.\n\nThe problem was found and the fix written with the help of an AI coding\nassistant. Tested on a Dell Precision M6500 (TI PCIxx12 FlashMedia,\n104c:803b) running a 7.0 kernel: removing an SD card oopsed every time\nwithout the fix; with it, insert, read and remove work.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmisc: tifm: don't clear dev->driver in tifm_device_remove()\n\ntifm_device_remove() sets sock->dev.driver to NULL after calling the\ndriver's remove() callback. Since commit a995fe1a3aa7 (\"rust: driver:\ndrop device private data post unbind\"), device_unbind_cleanup()\ndereferences dev->driver after the bus remove() callback has returned,\nso removing a card from a TI FlashMedia reader oopses:\n\n  BUG: kernel NULL pointer dereference, address: 0000000000000090\n  Workqueue: tifm tifm_7xx1_switch_media [tifm_7xx1]\n  RIP: 0010:device_unbind_cleanup+0x16/0xb0\n  Call Trace:\n   device_release_driver_internal+0x220/0x260\n   device_release_driver+0x12/0x20\n   bus_remove_device+0xf9/0x1c0\n   device_del+0x161/0x3b0\n   device_unregister+0x17/0x70\n   tifm_7xx1_switch_media.cold+0x6b/0xbd [tifm_7xx1]\n   process_one_work+0x1ac/0x3d0\n   worker_thread+0x1b8/0x360\n   kthread+0xf7/0x130\n   ret_from_fork+0x195/0x2a0\n   ret_from_fork_asm+0x1a/0x30\n\nThe driver core clears dev->driver itself in device_unbind_cleanup(), so\nthere is no need for the bus code to do it. Remove the assignment.\n\nThe problem was found and the fix written with the help of an AI coding\nassistant. Tested on a Dell Precision M6500 (TI PCIxx12 FlashMedia,\n104c:803b) running a 7.0 kernel: removing an SD card oopsed every time\nwithout the fix; with it, insert, read and remove work.","source":"cvelist"}],"published":"2026-11-30T13:25:16.137Z","modified":"2026-11-30T14:17:35.760Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"a995fe1a3aa78b7d06cc1cc7b6b8436c5e93b07f","fixed":"f1e465275afb9a09bb0f552b3cdaae051c7ffcaa","status":"affected"},{"type":"git","introduced":"a995fe1a3aa78b7d06cc1cc7b6b8436c5e93b07f","fixed":"2b23952d70d43321a90dd8a06bcaab04a1a73118","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.19","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/f1e465275afb9a09bb0f552b3cdaae051c7ffcaa","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2b23952d70d43321a90dd8a06bcaab04a1a73118","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-138818","url":"https://www.cve.org/CVERecord?id=CVE-2026-138818","licence":"CVE Terms of Use","modified":"2026-11-30T13:25:16.137Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-138818","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138818","licence":"Public domain","modified":"2026-11-30T14:17:35.760Z"}],"updatedAt":"2026-11-30T14:32:24.667Z","epss":{"score":0.0019,"percentile":0.09057,"date":"2026-12-01T12:00:22.000Z"}}