Entreprise d'experts en Sécurité Informatique : Audits et conseils en cybersécurité
Entreprise française de cybersécurité depuis 2004
☎ 03 60 47 09 81 - info@securiteinfo.com


CVE-2022-49937

Description

In the Linux kernel, the following vulnerability has been resolved:media: mceusb: Use new usb_control_msg_*() routinesAutomatic kernel fuzzing led to a WARN about invalid pipe direction inthe mceusb driver:------------[ cut here ]------------usb 6-1: BOGUS control dir, pipe 80000380 doesn't match bRequestType 40WARNING: CPU: 0 PID: 2465 at drivers/usb/core/urb.c:410usb_submit_urb+0x1326/0x1820 drivers/usb/core/urb.c:410Modules linked in:CPU: 0 PID: 2465 Comm: kworker/0:2 Not tainted 5.19.0-rc4-00208-g69cb6c6556ad #1Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS1.13.0-1ubuntu1.1 04/01/2014Workqueue: usb_hub_wq hub_eventRIP: 0010:usb_submit_urb+0x1326/0x1820 drivers/usb/core/urb.c:410Code: 7c 24 40 e8 ac 23 91 fd 48 8b 7c 24 40 e8 b2 70 1b ff 45 89 e844 89 f1 4c 89 e2 48 89 c6 48 c7 c7 a0 30 a9 86 e8 48 07 11 02 <0f> 0be9 1c f0 ff ff e8 7e 23 91 fd 0f b6 1d 63 22 83 05 31 ff 41RSP: 0018:ffffc900032becf0 EFLAGS: 00010282RAX: 0000000000000000 RBX: ffff8881100f3058 RCX: 0000000000000000RDX: ffffc90004961000 RSI: ffff888114c6d580 RDI: fffff52000657d90RBP: ffff888105ad90f0 R08: ffffffff812c3638 R09: 0000000000000000R10: 0000000000000005 R11: ffffed1023504ef1 R12: ffff888105ad9000R13: 0000000000000040 R14: 0000000080000380 R15: ffff88810ba96500FS: 0000000000000000(0000) GS:ffff88811a800000(0000) knlGS:0000000000000000CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033CR2: 00007ffe810bda58 CR3: 000000010b720000 CR4: 0000000000350ef0Call Trace:usb_start_wait_urb+0x101/0x4c0 drivers/usb/core/message.c:58usb_internal_control_msg drivers/usb/core/message.c:102 [inline]usb_control_msg+0x31c/0x4a0 drivers/usb/core/message.c:153mceusb_gen1_init drivers/media/rc/mceusb.c:1431 [inline]mceusb_dev_probe+0x258e/0x33f0 drivers/media/rc/mceusb.c:1807The reason for the warning is clear enough; the driver sends anunusual read request on endpoint 0 but does not set the USB_DIR_IN bitin the bRequestType field.More importantly, the whole situation can be avoided and the driversimplified by converting it over to the relatively newusb_control_msg_recv() and usb_control_msg_send() routines. That'swhat this fix does.

POC

Reference

No PoCs from references.

Github

- https://github.com/ARPSyndicate/cve-scores