CVE-2022-50419: Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hcisysfs: Fix attempting to call deviceadd multiple times
deviceadd shall not be called multiple times as stated in its documentation:
'Do not call this routine or deviceregister() more than once for any device structure'
Syzkaller reports a bug as follows [1]: ------------[ cut here ]------------ kernel BUG at lib/listdebug.c:33! invalid opcode: 0000 [#1] PREEMPT SMP KASAN [...] Call Trace: <TASK> listadd include/linux/list.h:69 [inline] listaddtail include/linux/list.h:102 [inline] kobjksetjoin lib/kobject.c:164 [inline] kobjectaddinternal+0x18f/0x8f0 lib/kobject.c:214 kobjectaddvarg lib/kobject.c:358 [inline] kobjectadd+0x150/0x1c0 lib/kobject.c:410 deviceadd+0x368/0x1e90 drivers/base/core.c:3452 hciconnaddsysfs+0x9b/0x1b0 net/bluetooth/hcisysfs.c:53 hcilecisestabilishedevt+0x57c/0xae0 net/bluetooth/hcievent.c:6799 hcilemetaevt+0x2b8/0x510 net/bluetooth/hcievent.c:7110 hcieventfunc net/bluetooth/hcievent.c:7440 [inline] hcieventpacket+0x63d/0xfd0 net/bluetooth/hcievent.c:7495 hcirxwork+0xae7/0x1230 net/bluetooth/hcicore.c:4007 processonework+0x991/0x1610 kernel/workqueue.c:2289 workerthread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 retfromfork+0x1f/0x30 arch/x86/entry/entry64.S:306 </TASK>
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50419?
CVE-2022-50419 is classified as a medium severity vulnerability in the Linux kernel due to improper handling of device additions.
How do I fix CVE-2022-50419?
To fix CVE-2022-50419, update your Linux kernel to the latest stable version where this issue has been resolved.
What impact does CVE-2022-50419 have on affected systems?
CVE-2022-50419 can lead to potential instability in Bluetooth device handling, which may result in system crashes or unexpected behavior.
Which versions of Linux kernel are affected by CVE-2022-50419?
CVE-2022-50419 affects various versions of the Linux kernel that implement Bluetooth device management incorrectly.
Is there a workaround for CVE-2022-50419?
Currently, the best approach for CVE-2022-50419 is to apply the kernel patch or upgrade to a patched version rather than relying on a workaround.