aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorJianglei Nie <[email protected]>2022-03-09 12:18:24 +0000
committerJakub Kicinski <[email protected]>2022-03-10 22:49:21 +0000
commitbc0e610a6eb0d46e4123fafdbe5e6141d9fff3be (patch)
treef8bc90a5e30554f524a5e1853461d62555c7d9fc /lib/test_fortify/write_overflow-strncpy-src.c
parentsctp: fix kernel-infoleak for SCTP sockets (diff)
downloadkernel-bc0e610a6eb0d46e4123fafdbe5e6141d9fff3be.tar.gz
kernel-bc0e610a6eb0d46e4123fafdbe5e6141d9fff3be.zip
net: arc_emac: Fix use after free in arc_mdio_probe()
If bus->state is equal to MDIOBUS_ALLOCATED, mdiobus_free(bus) will free the "bus". But bus->name is still used in the next line, which will lead to a use after free. We can fix it by putting the name in a local variable and make the bus->name point to the rodata section "name",then use the name in the error message without referring to bus to avoid the uaf. Fixes: 95b5fc03c189 ("net: arc_emac: Make use of the helper function dev_err_probe()") Signed-off-by: Jianglei Nie <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions