diff options
| author | Shin'ichiro Kawasaki <[email protected]> | 2022-06-01 19:51:59 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2022-06-10 15:53:12 +0200 |
| commit | 928ea98252ad75118950941683893cf904541da9 (patch) | |
| tree | 513a875e29ee2d55fd0a96954b3137d9f7247aec /scripts/gcc-plugins/gcc-generate-gimple-pass.h | |
| parent | 3ed8c7d39cfef831fe508fc1308f146912fa72e6 (diff) | |
bus: fsl-mc-bus: fix KASAN use-after-free in fsl_mc_bus_remove()
In fsl_mc_bus_remove(), mc->root_mc_bus_dev->mc_io is passed to
fsl_destroy_mc_io(). However, mc->root_mc_bus_dev is already freed in
fsl_mc_device_remove(). Then reference to mc->root_mc_bus_dev->mc_io
triggers KASAN use-after-free. To avoid the use-after-free, keep the
reference to mc->root_mc_bus_dev->mc_io in a local variable and pass to
fsl_destroy_mc_io().
This patch needs rework to apply to kernels older than v5.15.
Fixes: f93627146f0e ("staging: fsl-mc: fix asymmetry in destroy of mc_io")
Cc: [email protected] # v5.15+
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-gimple-pass.h')
0 files changed, 0 insertions, 0 deletions