Re: [PATCH net] rxrpc: rxgk: Fix uninitialised stack byte leaked via RXRPC_CHALLENGED

From: Simon Horman

Date: Wed Nov 18 2026 - 15:31:06 EST


On Thu, Nov 12, 2026 at 07:43:05PM +0800, lirongqing wrote:
> From: Li RongQing <lirongqing@xxxxxxxxx>
>
> rxgk_challenge_to_recvmsg() builds struct rxgk_challenge on the stack
> and passes all 8 bytes to put_cmsg() via RXRPC_CHALLENGED, but never
> initialises base.pad at offset 3. The struct has no implicit padding,
> so this byte contain leftover kernel stack data and be exposed to
> userspace. This issue was identified by code inspection.
>
> Zero-initialise the structure to prevent the potential information leak.
>
> Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)")
> Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>