In the Linux kernel, the following vulnerability has been resolved:
thunderbolt: Fix NULL pointer dereference in tbportupdate_credits()
Olliver reported that his system crashes when plugging in Thunderbolt 1 device:
BUG: kernel NULL pointer dereference, address: 0000000000000020 #PF: supervisor read access in kernel mode #PF: errorcode(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:tbportdoupdatecredits+0x1b/0x130 [thunderbolt] Call Trace: <TASK> ? _die+0x23/0x70 ? pagefaultoops+0x171/0x4e0 ? excpagefault+0x7f/0x180 ? asmexcpagefault+0x26/0x30 ? tbportdoupdatecredits+0x1b/0x130 ? tbswitchupdatelinkattributes+0x83/0xd0 tbswitchadd+0x7a2/0xfe0 tbscanport+0x236/0x6f0 tbhandlehotplug+0x6db/0x900 processonework+0x171/0x340 workerthread+0x27b/0x3a0 ? _pfxworkerthread+0x10/0x10 kthread+0xe5/0x120 ? _pfxkthread+0x10/0x10 retfromfork+0x31/0x50 ? _pfxkthread+0x10/0x10 retfromforkasm+0x1b/0x30 </TASK>
This is due the fact that some Thunderbolt 1 devices only have one lane adapter. Fix this by checking for the lane 1 before we read its credits.