lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMz9Wg8ez3U3qbB5AbyA_8QUkEoPyejyAhyy82+xwiH8wxi1Jw@mail.gmail.com>
Date: Tue, 3 Feb 2026 13:04:49 +0800
From: AceLan Kao <acelan.kao@...onical.com>
To: Sumit Semwal <sumit.semwal@...aro.org>, Christian König <christian.koenig@....com>, 
	linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org, 
	linaro-mm-sig@...ts.linaro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma-buf: set SB_I_NOEXEC and SB_I_NODEV on dmabuf filesystem

Chia-Lin Kao (AceLan) <acelan.kao@...onical.com> 於 2026年1月14日週三 上午9:19寫道:
>
> The VFS now warns if an inode flagged with S_ANON_INODE is located on a
> filesystem that does not have SB_I_NOEXEC set. dmabuf inodes are
> created using alloc_anon_inode(), which sets S_ANON_INODE.
>
> This triggers a warning in path_noexec() when a dmabuf is mmapped, for
> example by GStreamer's v4l2src element.
>
> [   60.061328] WARNING: CPU: 2 PID: 2803 at fs/exec.c:125 path_noexec+0xa0/0xd0
> ...
> [   60.061637]  do_mmap+0x2b5/0x680
>
> The warning was introduced by commit 1e7ab6f67824 ("anon_inode: rework
> assertions") which added enforcement that anonymous inodes must be on
> filesystems with SB_I_NOEXEC set.
>
> Fix this by setting SB_I_NOEXEC and SB_I_NODEV on the dmabuf filesystem
> context, following the same pattern as commit ce7419b6cf23d ("anon_inode:
> raise SB_I_NODEV and SB_I_NOEXEC") and commit 98f99394a104c ("secretmem:
> use SB_I_NOEXEC").
>
> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@...onical.com>
> ---
>  drivers/dma-buf/dma-buf.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index a4d8f2ff94e46..dea79aaab10ce 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -221,6 +221,8 @@ static int dma_buf_fs_init_context(struct fs_context *fc)
>         if (!ctx)
>                 return -ENOMEM;
>         ctx->dops = &dma_buf_dentry_ops;
> +       fc->s_iflags |= SB_I_NOEXEC;
> +       fc->s_iflags |= SB_I_NODEV;
>         return 0;
>  }
>
> --
> 2.51.0
>
A gentle ping, please review this patch, thanks.

-- 
Chia-Lin Kao(AceLan)
http://blog.acelan.idv.tw/
E-Mail: acelan.kaoATcanonical.com (s/AT/@/)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ