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-next>] [day] [month] [year] [list]
Message-ID: <20251220192210.399423-1-szymonwilczek@gmx.com>
Date: Sat, 20 Dec 2025 20:22:10 +0100
From: Szymon Wilczek <szymonwilczek@....com>
To: sumit.semwal@...aro.org,
	christian.koenig@....com
Cc: linux-media@...r.kernel.org,
	dri-devel@...ts.freedesktop.org,
	linaro-mm-sig@...ts.linaro.org,
	linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com,
	Szymon Wilczek <szymonwilczek@....com>,
	syzbot+cd944c467e4d4bc24cf6@...kaller.appspotmail.com
Subject: [PATCH] dma-buf: fix WARNING in dma_buf_vmap

When a driver's vmap callback returns an error (e.g. -ENOMEM), dma_buf_vmap()
triggers a WARN_ON_ONCE(). This is incorrect as vmap operations can legitimately
fail due to resource exhaustion or other transient conditions, as documented.

Fix this by removing the WARN_ON_ONCE(). The error code is already correctly
propagated to the caller.

Reported-by: syzbot+cd944c467e4d4bc24cf6@...kaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug\?extid\=4317d7108e14e5d56308
Signed-off-by: Szymon Wilczek <szymonwilczek@....com>
---
 drivers/dma-buf/dma-buf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index edaa9e4ee4ae..14b55f67ee1c 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1525,7 +1525,7 @@ int dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)
 	BUG_ON(iosys_map_is_set(&dmabuf->vmap_ptr));
 
 	ret = dmabuf->ops->vmap(dmabuf, &ptr);
-	if (WARN_ON_ONCE(ret))
+	if (ret)
 		return ret;
 
 	dmabuf->vmap_ptr = ptr;
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ