]> git.baikalelectronics.ru Git - kernel.git/commit
net/rds: Avoid potential use after free in rds_send_remove_from_sock
authorAditya Pakki <pakki001@umn.edu>
Wed, 7 Apr 2021 00:09:12 +0000 (19:09 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Apr 2021 21:01:24 +0000 (14:01 -0700)
commit0c85a7e87465f2d4cbc768e245f4f45b2f299b05
treef653dfb46e6bd1f35733c346052343ee5be02643
parent5219d6012d46ec1fa3397e50bfeb7b8c16df72cf
net/rds: Avoid potential use after free in rds_send_remove_from_sock

In case of rs failure in rds_send_remove_from_sock(), the 'rm' resource
is freed and later under spinlock, causing potential use-after-free.
Set the free pointer to NULL to avoid undefined behavior.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/message.c
net/rds/send.c