diff options
author | Ziqi Zhao <astrajoan@yahoo.com> | 2023-07-21 09:14:46 -0700 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2023-12-08 10:20:56 +0100 |
commit | 3823119b9c2b5f9e9b760336f75bc989b805cde6 (patch) | |
tree | 4c7e0cf286beab8f39d1ecf3e4e9924c211b9079 /scripts/gdb/linux/utils.py | |
parent | 5a6c9a05e55cb2972396cc991af9d74c8c15029a (diff) |
drm/crtc: Fix uninit-value bug in drm_mode_setcrtc
The connector_set contains uninitialized values when allocated with
kmalloc_array. However, in the "out" branch, the logic assumes that any
element in connector_set would be equal to NULL if failed to
initialize, which causes the bug reported by Syzbot. The fix is to use
an extra variable to keep track of how many connectors are initialized
indeed, and use that variable to decrease any refcounts in the "out"
branch.
Reported-by: syzbot+4fad2e57beb6397ab2fc@syzkaller.appspotmail.com
Signed-off-by: Ziqi Zhao <astrajoan@yahoo.com>
Reported-and-tested-by: syzbot+4fad2e57beb6397ab2fc@syzkaller.appspotmail.com
Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20230721161446.8602-1-astrajoan@yahoo.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions