Whamcloud - gitweb
LU-17650 gss: fix use out of bounds in ptlrpc_gss
authorOleg Drokin <green@whamcloud.com>
Tue, 19 Mar 2024 03:10:13 +0000 (23:10 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 27 Apr 2024 22:31:04 +0000 (22:31 +0000)
commitb3716faed9ce2b81f7c5da4f858cee2db3565ba3
treea9643cd9b380e0d246511a788f7992b5ad2b7053
parentcc500ced218dac3ec838752c2a1b0b4400ba1617
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

Lustre-change: https://review.whamcloud.com/54452
Lustre-commit: 9519751c59f3a31b1c1fc2f7771699000aca09a2

Change-Id: I2292900b54756bf39530c96f7c5c228835562bef
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54892
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ptlrpc/gss/gss_svc_upcall.c