stack smashing detected with 'nvme sanitize-log /dev/nvme0'

Daniel Wagner dwagner at suse.de
Mon Sep 25 08:09:16 PDT 2023


On Mon, Aug 28, 2023 at 11:21:55AM +0200, Christoph Hellwig wrote:
> On Fri, Aug 25, 2023 at 08:36:50AM +0200, Daniel Wagner wrote:
> > Okay, let's ignore the regression argument then. But what about the fact
> > we are asking for 512 bytes via the kernels API and get too much data?
> > Isn't this something we should address? I mean this forces all users of
> > this kernel API allocate enough large buffers to handle this device.
> 
> There isn't really much the kernel can do except for using an IOMMU
> when available to protect itself from this, but that will mean we're
> shutting down the device when it does that.
> 
> The device just seems completely broken unfortunately.

Just a follow up on this. I've update nvme-cli so that all payloads are
allocated via the nvme_alloc() helper which ensures that the payloads
start at a 4k boundary and the buffer is multiple of 4k. This should
address this issue.

As turns out, more devices suffer from this problem: SK hynix PC611 NVMe
512GB SSD[1].

[1] https://github.com/storaged-project/udisks/issues/1193



More information about the Linux-nvme mailing list