aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorLizhi Xu <[email protected]>2025-04-14 07:11:23 +0000
committerGreg Kroah-Hartman <[email protected]>2025-04-15 16:15:14 +0000
commitbc2c46426f2d95e58c82f394531afdd034c8706c (patch)
tree5eaf7db4f520c11bbf11873a85a4db77e55d88bf /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentdevice property: Add a note to the fwnode.h (diff)
downloadkernel-bc2c46426f2d95e58c82f394531afdd034c8706c.tar.gz
kernel-bc2c46426f2d95e58c82f394531afdd034c8706c.zip
software node: Prevent link creation failure from causing kobj reference count imbalance
syzbot reported a uaf in software_node_notify_remove. [1] When any of the two sysfs_create_link() in software_node_notify() fails, the swnode->kobj reference count will not increase normally, which will cause swnode to be released incorrectly due to the imbalance of kobj reference count when executing software_node_notify_remove(). Increase the reference count of kobj before creating the link to avoid uaf. [1] BUG: KASAN: slab-use-after-free in software_node_notify_remove+0x1bc/0x1c0 drivers/base/swnode.c:1108 Read of size 1 at addr ffff888033c08908 by task syz-executor105/5844 Freed by task 5844: software_node_notify_remove+0x159/0x1c0 drivers/base/swnode.c:1106 device_platform_notify_remove drivers/base/core.c:2387 [inline] Fixes: 9eb59204d519 ("iommufd/selftest: Add set_dev_pasid in mock iommu") Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=2ff22910687ee0dfd48e Tested-by: [email protected] Signed-off-by: Lizhi Xu <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions