summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZhou Qingyang <zhou1615@umn.edu>2021-12-01 18:13:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-27 13:03:24 +0300
commite833ef0b545e1a5b3eaf00af391c4fd1fb47ffd8 (patch)
treea24f47f8ba302be9aa9165b96c88fa2cd9f66926 /tools
parent1e22b51876fa786c0b972e327ffb5cc686873cd1 (diff)
downloadlinux-e833ef0b545e1a5b3eaf00af391c4fd1fb47ffd8.tar.xz
drm/radeon/radeon_kms: Fix a NULL pointer dereference in radeon_driver_open_kms()
[ Upstream commit ab50cb9df8896b39aae65c537a30de2c79c19735 ] In radeon_driver_open_kms(), radeon_vm_bo_add() is assigned to vm->ib_bo_va and passes and used in radeon_vm_bo_set_addr(). In radeon_vm_bo_set_addr(), there is a dereference of vm->ib_bo_va, which could lead to a NULL pointer dereference on failure of radeon_vm_bo_add(). Fix this bug by adding a check of vm->ib_bo_va. This bug was found by a static analyzer. The analysis employs differential checking to identify inconsistent security operations (e.g., checks or kfrees) between two code paths and confirms that the inconsistent operations are not recovered in the current function or the callers, so they constitute bugs. Note that, as a bug found by static analysis, it can be a false positive or hard to trigger. Multiple researchers have cross-reviewed the bug. Builds with CONFIG_DRM_RADEON=m show no new warnings, and our static analyzer no longer warns about this code. Fixes: cc9e67e3d700 ("drm/radeon: fix VM IB handling") Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Zhou Qingyang <zhou1615@umn.edu> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions