From: Peilin Ye <[email protected]>
Date: Thu, 30 Jul 2020 15:20:26 -0400
> rds_notify_queue_get() is potentially copying uninitialized kernel stack
> memory to userspace since the compiler may leave a 4-byte hole at the end
> of `cmsg`.
>
> In 2016 we tried to fix this issue by doing `= { 0 };` on `cmsg`, which
> unfortunately does not always initialize that 4-byte hole. Fix it by using
> memset() instead.
>
> Cc: [email protected]
> Fixes: f037590fff30 ("rds: fix a leak of kernel memory")
> Fixes: bdbe6fbc6a2f ("RDS: recv.c")
> Suggested-by: Dan Carpenter <[email protected]>
> Signed-off-by: Peilin Ye <[email protected]>
Applied and queued up for -stable, thanks.
I saw a suggestion to use __packed but that breaks UAPI and is definitely
not an option to solve this problem.