Whamcloud - gitweb
LU-17650 gss: fix use out of bounds in ptlrpc_gss 52/54452/6
authorOleg Drokin <green@whamcloud.com>
Tue, 19 Mar 2024 03:10:13 +0000 (23:10 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Apr 2024 19:56:17 +0000 (19:56 +0000)
commit9519751c59f3a31b1c1fc2f7771699000aca09a2
tree8dae3a51fe3cb819cb913c8a4fce6c3e38af4c6a
parent69eb7b89c7f36ec6a8970e87fc8859207f4b9c0c
LU-17650 gss: fix use out of bounds in ptlrpc_gss

KASAN highlighted that the sockaddr_un struct is not enough
for the kernel primitives we use, so we have to use the
bigger sockaddr_storage for allocation, alas the field
names inside are different so we have to jump through some
hoops to make it actually work.
Also for a 128 byte allocation on stack variable is fine and
cannpot fail, so convert to that

Change-Id: I2292900b54756bf39530c96f7c5c228835562bef
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54452
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
lustre/ptlrpc/gss/gss_svc_upcall.c