2020-11-30 16:13:14

by syzbot

[permalink] [raw]
Subject: general protection fault in drm_client_buffer_vunmap

Hello,

syzbot found the following issue on:

HEAD commit: 6147c83f Add linux-next specific files for 20201126
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=109130a5500000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b91566da897c24f
dashboard link: https://syzkaller.appspot.com/bug?extid=10328e8428a896b65119
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12541369500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1365c663500000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

[drm] Initialized udl on minor 2
[drm:udl_get_edid_block] *ERROR* Read EDID byte 0 failed err ffffffb9
udl 1-1:0.0: [drm] Cannot find any crtc or sizes
usb 1-1: USB disconnect, device number 2
general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 0 PID: 7 Comm: kworker/0:1 Not tainted 5.10.0-rc5-next-20201126-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
RIP: 0010:drm_client_buffer_vunmap+0x26/0x50 drivers/gpu/drm/drm_client.c:347
Code: 00 00 00 00 53 48 89 fb 48 83 ec 08 e8 83 8b 3f fd 48 8d 7b 10 48 b8 00 00 00 00 00 fc ff df 48 8d 73 18 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 0e 48 8b 7b 10 48 83 c4 08 5b e9 56 61 f7 ff 48 89
RSP: 0018:ffffc90000cc7710 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff815524de
RDX: 0000000000000002 RSI: 0000000000000018 RDI: 0000000000000010
RBP: ffff88801db748c8 R08: 0000000000000000 R09: ffff88801db74a17
R10: ffffed1003b6e942 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88801db748d8 R14: ffff88801db74810 R15: dead000000000100
FS: 0000000000000000(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055f43f9d79e0 CR3: 000000000b08e000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
drm_fbdev_cleanup+0x380/0x440 drivers/gpu/drm/drm_fb_helper.c:2042
drm_fbdev_release drivers/gpu/drm/drm_fb_helper.c:2049 [inline]
drm_fbdev_client_unregister+0x61/0x80 drivers/gpu/drm/drm_fb_helper.c:2376
drm_client_dev_unregister+0x239/0x3b0 drivers/gpu/drm/drm_client.c:175
drm_dev_unregister+0xe9/0x2b0 drivers/gpu/drm/drm_drv.c:942
usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458
__device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1154
device_release_driver_internal drivers/base/dd.c:1185 [inline]
device_release_driver+0x26/0x40 drivers/base/dd.c:1208
bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533
device_del+0x502/0xec0 drivers/base/core.c:3113
usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1417
usb_disconnect.cold+0x27d/0x780 drivers/usb/core/hub.c:2218
hub_port_connect drivers/usb/core/hub.c:5074 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5363 [inline]
port_event drivers/usb/core/hub.c:5509 [inline]
hub_event+0x1c8a/0x42d0 drivers/usb/core/hub.c:5591
process_one_work+0x98d/0x15f0 kernel/workqueue.c:2272
process_scheduled_works kernel/workqueue.c:2334 [inline]
worker_thread+0x82b/0x1120 kernel/workqueue.c:2420
kthread+0x3b1/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
Modules linked in:
---[ end trace 5e45793b7de819bc ]---
RIP: 0010:drm_client_buffer_vunmap+0x26/0x50 drivers/gpu/drm/drm_client.c:347
Code: 00 00 00 00 53 48 89 fb 48 83 ec 08 e8 83 8b 3f fd 48 8d 7b 10 48 b8 00 00 00 00 00 fc ff df 48 8d 73 18 48


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at [email protected].

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches


2021-04-11 12:33:16

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] general protection fault in drm_client_buffer_vunmap

syzbot suspects this issue was fixed by commit:

commit 874a52f9b693ed8bf7a92b3592a547ce8a684e6f
Author: Tong Zhang <[email protected]>
Date: Sun Feb 28 04:46:25 2021 +0000

drm/fb-helper: only unmap if buffer not null

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10c27b7ed00000
start commit: c03c21ba Merge tag 'keys-misc-20210126' of git://git.kerne..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=ec4c85e44cc3172e
dashboard link: https://syzkaller.appspot.com/bug?extid=10328e8428a896b65119
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12d95d7ad00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=148da9ccd00000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: drm/fb-helper: only unmap if buffer not null

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

2021-04-11 20:52:44

by Thomas Zimmermann

[permalink] [raw]
Subject: Re: [syzbot] general protection fault in drm_client_buffer_vunmap

#syz fix: drm/fb-helper: only unmap if buffer not null

Am 11.04.21 um 14:01 schrieb syzbot:
> #syz fix: drm/fb-helper: only unmap if buffer not null

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


Attachments:
OpenPGP_signature (855.00 B)
OpenPGP digital signature