В ядре Linux устранена следующая уязвимость:
ath9k_htc: исправлены ошибки значений uninit. Syzbot сообщил о двух ошибках KMSAN в ath9k. Все они вызваны отсутствием
инициализация поля.
В htc_connect_service() svc_meta_len и Pad не инициализируются. Основанный
по коду похоже в текущем скб нет служебных данных, так что просто
инициализируйте svc_meta_len значением 0.
htc_issue_send() не инициализирует массив htc_frame_hdr::control. Основанный
в коде прошивки он инициализирует его сам, поэтому просто обнулите
массив, который сделает KMSAN счастливым
Журналы ошибок:
ОШИБКА: KMSAN: утечка ядра-usb-info в драйверах usb_submit_urb+0x6c1/0x2aa0/usb/core/urb.c:430.
usb_submit_urb+0x6c1/0x2aa0 драйверы/usb/core/urb.c:430
hif_usb_send_regout driver/net/wireless/ath/ath9k/hif_usb.c:127 [встроенный]
hif_usb_send+0x5f0/0x16f0 driver/net/wireless/ath/ath9k/hif_usb.c:479
htc_issue_send driver/net/wireless/ath/ath9k/htc_hst.c:34 [встроенный]
htc_connect_service+0x143e/0x1960 driver/net/wireless/ath/ath9k/htc_hst.c:275
...
Uninit был создан по адресу:
slab_post_alloc_hook мм/slab.h:524 [встроенный]
slab_alloc_node мм/slub.c:3251 [встроенный]
__kmalloc_node_track_caller+0xe0c/0x1510 мм/slub.c:4974
kmalloc_reserve net/core/skbuff.c:354 [встроенный]
__alloc_skb+0x545/0xf90 net/core/skbuff.c:426
alloc_skb include/linux/skbuff.h:1126 [встроенный]
htc_connect_service+0x1029/0x1960 драйверы/net/wireless/ath/ath9k/htc_hst.c:258
... Байты 4–7 из 18 не инициализированы. Доступ к памяти размером 18 начинается с ffff888027377e00.
ОШИБКА: KMSAN: утечка ядра-usb-info в драйверах usb_submit_urb+0x6c1/0x2aa0/usb/core/urb.c:430.
usb_submit_urb+0x6c1/0x2aa0 драйверы/usb/core/urb.c:430
hif_usb_send_regout driver/net/wireless/ath/ath9k/hif_usb.c:127 [встроенный]
hif_usb_send+0x5f0/0x16f0 driver/net/wireless/ath/ath9k/hif_usb.c:479
htc_issue_send driver/net/wireless/ath/ath9k/htc_hst.c:34 [встроенный]
htc_connect_service+0x143e/0x1960 driver/net/wireless/ath/ath9k/htc_hst.c:275
... Uninit был создан по адресу:
slab_post_alloc_hook мм/slab.h:524 [встроенный]
slab_alloc_node мм/slub.c:3251 [встроенный]
__kmalloc_node_track_caller+0xe0c/0x1510 мм/slub.c:4974
kmalloc_reserve net/core/skbuff.c:354 [встроенный]
__alloc_skb+0x545/0xf90 net/core/skbuff.c:426
alloc_skb include/linux/skbuff.h:1126 [встроенный]
htc_connect_service+0x1029/0x1960 драйверы/net/wireless/ath/ath9k/htc_hst.c:258
... Байты 16–17 из 18 не инициализированы.
Доступ к памяти размером 18 начинается с ffff888027377e00.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ath9k_htc: fix uninit value bugs Syzbot reported 2 KMSAN bugs in ath9k. All of them are caused by missing field initialization. In htc_connect_service() svc_meta_len and pad are not initialized. Based on code it looks like in current skb there is no service data, so simply initialize svc_meta_len to 0. htc_issue_send() does not initialize htc_frame_hdr::control array. Based on firmware code, it will initialize it by itself, so simply zero whole array to make KMSAN happy Fail logs: BUG: KMSAN: kernel-usb-infoleak in usb_submit_urb+0x6c1/0x2aa0 drivers/usb/core/urb.c:430 usb_submit_urb+0x6c1/0x2aa0 drivers/usb/core/urb.c:430 hif_usb_send_regout drivers/net/wireless/ath/ath9k/hif_usb.c:127 [inline] hif_usb_send+0x5f0/0x16f0 drivers/net/wireless/ath/ath9k/hif_usb.c:479 htc_issue_send drivers/net/wireless/ath/ath9k/htc_hst.c:34 [inline] htc_connect_service+0x143e/0x1960 drivers/net/wireless/ath/ath9k/htc_hst.c:275 ... Uninit was created at: slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:3251 [inline] __kmalloc_node_track_caller+0xe0c/0x1510 mm/slub.c:4974 kmalloc_reserve net/core/skbuff.c:354 [inline] __alloc_skb+0x545/0xf90 net/core/skbuff.c:426 alloc_skb include/linux/skbuff.h:1126 [inline] htc_connect_service+0x1029/0x1960 drivers/net/wireless/ath/ath9k/htc_hst.c:258 ... Bytes 4-7 of 18 are uninitialized Memory access of size 18 starts at ffff888027377e00 BUG: KMSAN: kernel-usb-infoleak in usb_submit_urb+0x6c1/0x2aa0 drivers/usb/core/urb.c:430 usb_submit_urb+0x6c1/0x2aa0 drivers/usb/core/urb.c:430 hif_usb_send_regout drivers/net/wireless/ath/ath9k/hif_usb.c:127 [inline] hif_usb_send+0x5f0/0x16f0 drivers/net/wireless/ath/ath9k/hif_usb.c:479 htc_issue_send drivers/net/wireless/ath/ath9k/htc_hst.c:34 [inline] htc_connect_service+0x143e/0x1960 drivers/net/wireless/ath/ath9k/htc_hst.c:275 ... Uninit was created at: slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:3251 [inline] __kmalloc_node_track_caller+0xe0c/0x1510 mm/slub.c:4974 kmalloc_reserve net/core/skbuff.c:354 [inline] __alloc_skb+0x545/0xf90 net/core/skbuff.c:426 alloc_skb include/linux/skbuff.h:1126 [inline] htc_connect_service+0x1029/0x1960 drivers/net/wireless/ath/ath9k/htc_hst.c:258 ... Bytes 16-17 of 18 are uninitialized Memory access of size 18 starts at ffff888027377e00
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 8
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.35
|
4.9.311
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.10
|
4.14.276
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.15
|
4.19.238
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.20
|
5.4.189
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.5
|
5.10.110
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.33
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
5.16.19
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.17
|
5.17.2
|