aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorConor Dooley <[email protected]>2023-04-13 23:20:45 +0100
committerStephen Boyd <[email protected]>2023-04-13 15:44:11 -0700
commit7455b7007b9e93bcc2bc9c1c6c73a228e3152069 (patch)
tree45b1121d9ced8a597f4d5b79e391772d8ed7329f /lib/test_fortify/write_overflow-strncpy-src.c
parentfb8b9d23f15f1440671d0127f7ad68d679fd29a3 (diff)
clk: microchip: fix potential UAF in auxdev release callback
Similar to commit 1c11289b34ab ("peci: cpu: Fix use-after-free in adev_release()"), the auxiliary device is not torn down in the correct order. If auxiliary_device_add() fails, the release callback will be called twice, resulting in a UAF. Due to timing, the auxdev code in this driver "took inspiration" from the aforementioned commit, and thus its bugs too! Moving auxiliary_device_uninit() to the unregister callback instead avoids the issue. CC: [email protected] Fixes: b56bae2dd6fd ("clk: microchip: mpfs: add reset controller") Signed-off-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/20230413-critter-synopsis-dac070a86cb4@spud Signed-off-by: Stephen Boyd <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions