Vito Caputo
ca8f245f28
media: cxusb: detect cxusb_ctrl_msg error in query
Don't use uninitialized ircode[] in cxusb_rc_query() when
cxusb_ctrl_msg() fails to populate its contents.
syzbot reported:
dvb-usb: bulk message failed: -22 (1/-30591)
=====================================================
BUG: KMSAN: uninit-value in ir_lookup_by_scancode drivers/media/rc/rc-main.c:494 [inline]
BUG: KMSAN: uninit-value in rc_g_keycode_from_table drivers/media/rc/rc-main.c:582 [inline]
BUG: KMSAN: uninit-value in rc_keydown+0x1a6/0x6f0 drivers/media/rc/rc-main.c:816
CPU: 1 PID: 11436 Comm: kworker/1:2 Not tainted 5.3.0-rc7+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events dvb_usb_read_remote_control
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x191/0x1f0 lib/dump_stack.c:113
kmsan_report+0x13a/0x2b0 mm/kmsan/kmsan_report.c:108
__msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:250
bsearch+0x1dd/0x250 lib/bsearch.c:41
ir_lookup_by_scancode drivers/media/rc/rc-main.c:494 [inline]
rc_g_keycode_from_table drivers/media/rc/rc-main.c:582 [inline]
rc_keydown+0x1a6/0x6f0 drivers/media/rc/rc-main.c:816
cxusb_rc_query+0x2e1/0x360 drivers/media/usb/dvb-usb/cxusb.c:548
dvb_usb_read_remote_control+0xf9/0x290 drivers/media/usb/dvb-usb/dvb-usb-remote.c:261
process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
kthread+0x4b5/0x4f0 kernel/kthread.c:256
ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355
Uninit was stored to memory at:
kmsan_save_stack_with_flags mm/kmsan/kmsan.c:150 [inline]
kmsan_internal_chain_origin+0xd2/0x170 mm/kmsan/kmsan.c:314
__msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:184
rc_g_keycode_from_table drivers/media/rc/rc-main.c:583 [inline]
rc_keydown+0x2c4/0x6f0 drivers/media/rc/rc-main.c:816
cxusb_rc_query+0x2e1/0x360 drivers/media/usb/dvb-usb/cxusb.c:548
dvb_usb_read_remote_control+0xf9/0x290 drivers/media/usb/dvb-usb/dvb-usb-remote.c:261
process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
kthread+0x4b5/0x4f0 kernel/kthread.c:256
ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355
Local variable description: ----ircode@cxusb_rc_query
Variable was created at:
cxusb_rc_query+0x4d/0x360 drivers/media/usb/dvb-usb/cxusb.c:543
dvb_usb_read_remote_control+0xf9/0x290 drivers/media/usb/dvb-usb/dvb-usb-remote.c:261
Signed-off-by: Vito Caputo <vcaputo@pengaru.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-10-16 11:49:27 -03:00
..
2019-09-28 08:14:15 -07:00
2019-09-22 09:39:09 -07:00
2019-09-04 13:31:26 +02:00
2019-09-19 12:21:44 -06:00
2019-09-25 13:54:45 +02:00
2019-09-17 16:22:26 -07:00
2019-09-24 15:54:11 -07:00
2019-09-13 16:44:49 +03:00
2019-09-26 10:29:42 -07:00
2019-09-15 14:17:27 +02:00
2019-09-30 10:04:28 -07:00
2019-09-29 19:25:39 -07:00
2019-09-29 11:20:41 -07:00
2019-09-22 09:30:30 -07:00
2019-07-27 22:55:27 +01:00
2019-09-17 19:15:14 -07:00
2019-09-17 19:15:14 -07:00
2019-09-24 16:10:23 -07:00
2019-07-19 10:42:02 -07:00
2019-08-26 21:37:37 +09:00
2019-09-22 09:30:30 -07:00
2019-08-20 13:49:15 +01:00
2019-09-22 09:39:09 -07:00
2019-05-30 11:29:53 -07:00
2019-09-19 14:14:28 -07:00
2019-09-30 10:04:28 -07:00
2019-09-18 11:14:31 -07:00
2019-08-28 22:59:18 +02:00
2019-05-21 10:50:46 +02:00
2019-09-27 12:19:47 -07:00
2019-09-27 11:13:35 -07:00
2019-09-24 12:36:31 -07:00
2019-09-22 12:02:21 -07:00
2019-09-24 12:36:31 -07:00
2019-09-29 11:20:41 -07:00
2019-06-29 21:08:14 -07:00
2019-09-18 11:14:31 -07:00
2019-09-28 20:44:12 +02:00
2019-08-27 09:43:59 +02:00
2019-09-19 14:14:28 -07:00
2019-09-28 17:47:33 -07:00
2019-09-19 14:14:28 -07:00
2019-09-29 10:00:14 -07:00
2019-07-11 15:38:21 -07:00
2019-09-22 09:30:30 -07:00
2019-09-24 16:37:18 +02:00
2019-09-12 20:45:52 +02:00
2019-09-05 13:17:01 -06:00
2019-09-17 00:54:29 -05:00
2019-09-24 16:31:50 -07:00
2019-10-16 11:49:27 -03:00
2019-09-11 16:11:01 +02:00
2019-09-29 10:24:23 -07:00
2019-09-24 16:48:02 -07:00
2019-09-27 20:48:20 +02:00
2019-09-22 09:30:30 -07:00
2019-09-28 17:47:33 -07:00
2019-09-27 20:31:18 +02:00
2019-09-23 17:20:40 -04:00
2019-09-29 10:33:41 -07:00
2019-09-24 16:31:50 -07:00
2019-09-18 11:14:31 -07:00
2019-09-28 17:47:33 -07:00
2019-09-19 13:27:23 -07:00
2019-09-18 11:14:31 -07:00
2019-09-28 08:14:15 -07:00
2019-09-28 08:14:15 -07:00
2019-09-23 19:16:01 -07:00
2019-09-19 14:19:33 -07:00
2019-09-24 12:39:40 -07:00
2019-09-22 12:04:59 -07:00
2019-09-17 19:15:14 -07:00
2019-07-16 19:23:24 -07:00
2019-09-27 20:25:32 +02:00
2019-09-27 12:19:47 -07:00
2019-09-17 18:40:42 -07:00
2019-09-22 10:55:08 -07:00
2019-09-30 10:04:28 -07:00
2019-09-17 15:33:31 -07:00
2019-09-22 11:05:43 -07:00
2019-09-26 11:30:16 -07:00
2019-09-24 16:31:50 -07:00
2019-05-21 10:50:46 +02:00
2019-09-16 15:52:38 -07:00
2019-09-22 10:52:23 -07:00
2019-09-17 18:40:42 -07:00
2019-06-05 17:36:37 +02:00
2019-09-13 17:23:18 +03:00
2019-10-10 07:28:25 -03:00
2019-09-24 15:54:08 -07:00
2019-05-21 10:50:46 +02:00
2019-09-25 17:51:41 -07:00
2019-09-29 10:24:23 -07:00
2019-08-26 12:15:06 +03:00
2019-09-28 08:14:15 -07:00
2019-09-18 11:14:31 -07:00
2019-09-24 12:33:34 -07:00
2019-09-25 17:51:41 -07:00
2019-09-15 14:17:27 +02:00
2019-09-23 19:33:56 -07:00
2019-05-21 10:50:46 +02:00
2019-09-09 10:43:15 -04:00
2019-09-27 11:17:38 -07:00
2019-09-26 11:22:14 -07:00
2019-09-18 11:05:34 -07:00
2019-09-18 11:05:34 -07:00