[blktests] nvme/077: Add ANA log page information leak test
Shin'ichiro Kawasaki
shinichiro.kawasaki at wdc.com
Thu Nov 12 02:36:09 PST 2026
On Nov 04, 2026 / 12:38, Jesse Taube wrote:
> Regression test for reading memory contents beyond valid data when
> reading ANA log page. The NVMe target must zero-fill the ANA log page
> response buffer beyond the valid data so that stale kernel memory is
> not leaked to the host.
>
> The helper program (nvme-ana-log), requests the ANA log page,
> parses the response header to find where valid data ends, and checks
> that every trailing byte is zero. The check is repeated 64 times because
> leaked data may incidentally be zeroed.
>
> Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
> Signed-off-by: Jesse Taube <jtaubepe at redhat.com>
> ---
> This test is meant to test:
> Lore Link: https://lore.kernel.org/linux-nvme/20261104172833.161567-1-emilne@redhat.com/
Thank you for the patch. I ran the new test case on the v7.4-rc2 kernel and
confirmed it passes. When I reverted the kernel commit 29b8758b470 (" nvmet:
don't return memory contents beyond valid data when reading ANA log page"),
the test case failed. Looks working well.
Overall, this blktests patch looks good. I have three minor comments below:
1) src/.gitignore should have "/nvme-ana-log".
2) it's the better to note about the kernel commit in the commit log and
the test case comment
3) I think "--port 0" option of _nvme_connect_subsys call in test() is not
required
Jesee, if you are fine, I will make ammendments based on the comments above
and apply this patch. Or you can respin the patch. Please let me know your
preference.
More information about the Linux-nvme
mailing list