[PATCH] nvmet: zero the reservation report tail beyond NUMD
Nilay Shroff
nilay at linux.ibm.com
Wed Nov 25 01:51:38 PST 2026
On 11/25/26 11:44 AM, Guixin Liu wrote:
> The reservation report handler allocates a buffer of 4 * (NUMD + 1)
> bytes and copies it to the command SGL, but the data is sent back to
> the host using the SGL length, which is independent of NUMD. When the
> host supplies a buffer larger than NUMD, the tail beyond the copied
> data is returned uninitialised, leaking kernel heap contents to a
> fabric host.
>
> Zero the SGL tail beyond the transferred data, as the discovery log
> page handler already does.
>
> Fixes: 5a47c2080a73 ("nvmet: support reservation feature")
> Cc:stable at vger.kernel.org
> Signed-off-by: Guixin Liu<kanie at linux.alibaba.com>
Looks good to me:
Reviewed-by: Nilay Shroff <nilay at linux.ibm.com>
More information about the Linux-nvme
mailing list