mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
3a732b4673
Currently, we have a bug where a simultaneous DROPTAG ioctl and socket
close may race, as we attempt to remove a key from lists twice, and
perform an unref for each removal operation. This may result in a uaf
when we attempt the second unref.
This change fixes the race by making __mctp_key_remove tolerant to being
called on a key that has already been removed from the socket/net lists,
and only performs the unref when we do the actual remove. We also need
to hold the list lock on the ioctl cleanup path.
This fix is based on a bug report and comprehensive analysis from
butt3rflyh4ck <butterflyhuangxx@gmail.com>, found via syzkaller.
Cc: stable@vger.kernel.org
Fixes:
|
||
---|---|---|
.. | ||
test | ||
af_mctp.c | ||
device.c | ||
Kconfig | ||
Makefile | ||
neigh.c | ||
route.c |