diff options
| author | Adrian Hunter <adrian.hunter@intel.com> | 2026-08-07 17:56:28 +0300 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2026-08-08 15:02:50 +0200 |
| commit | feb0ed76601f3c2f91f08688c5a7d8b9d382f720 (patch) | |
| tree | 8ff74cbc2e632f734d0a2a3c64340e817d41b942 /scripts/objdiff | |
| parent | 4dc1b3eeba7991905a5b5b8129ebea51be7d87b7 (diff) | |
| download | linux-feb0ed76601f3c2f91f08688c5a7d8b9d382f720.tar.gz linux-feb0ed76601f3c2f91f08688c5a7d8b9d382f720.zip | |
i3c: master: Fix use-after-free of master->this
sysfs attribute callbacks for the master controller device dereference
master->this. However, master->this is freed in
i3c_master_detach_free_devs() before the master device itself is
released.
As a result, sysfs accesses can dereference a freed master->this
pointer, leading to a use-after-free.
Keep master->this alive until i3c_masterdev_release(), which is called
after the master device and its sysfs state are being torn down. Do not
free master->this as part of the normal device detach path.
On the error path in i3c_master_set_info(), reset master->this and
bus.cur_master to NULL before freeing the allocated device.
Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260807145638.168865-5-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
