[PATCH] nvmet: validate device_path before enabling namespace

Yalagada Pavan Kumar pavankumaryalagada at gmail.com
Wed Sep 9 01:11:57 PDT 2026


On Tue, Sep 08, 2026 at 01:57:17PM -0600, Keith Busch wrote:
> On Wed, Sep 09, 2026 at 01:04:52AM +0530, pavankumaryalagada at gmail.com wrote:
> > From: Yalagada Pavan Kumar <pavankumaryalagada at gmail.com>
> > 
> > When buffered_io is enabled, nvmet_bdev_ns_enable() returns -ENOTBLK
> > without checking whether device_path is configured. nvmet_ns_enable()
> > then falls back to nvmet_file_ns_enable(), which passes the NULL
> > device_path to filp_open() and causes a NULL pointer dereference.
> > 
> > Validate device_path before attempting to enable to namespace and
> > return -EINVAL when it has not been configured.
> 
> This was alraedy closed:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=09d0c07bd9ce3b2f2d993f672698d32a17543c32

Good to hear this has already been fixed. I'll drop the patch.

Thanks
Pavan




More information about the Linux-nvme mailing list