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>] [day] [month] [year] [list]
Message-Id: <20180912063316.21047-4-kraxel@redhat.com>
Date:   Wed, 12 Sep 2018 08:33:16 +0200
From:   Gerd Hoffmann <kraxel@...hat.com>
To:     dri-devel@...ts.freedesktop.org
Cc:     laurent.pinchart@...asonboard.com, daniel@...ll.ch,
        Gerd Hoffmann <kraxel@...hat.com>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        linux-media@...r.kernel.org (open list:DMA BUFFER SHARING FRAMEWORK),
        linaro-mm-sig@...ts.linaro.org (moderated list:DMA BUFFER SHARING
        FRAMEWORK), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v3 3/3] udmabuf: check that flags has no unsupported bits set

Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
Reported-by: Yann Droneaud <ydroneaud@...eya.com>
---
 drivers/dma-buf/udmabuf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 964beadd11..acd97670c5 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -128,6 +128,9 @@ static long udmabuf_create(const struct udmabuf_create_list *head,
 	int seals, ret = -EINVAL;
 	u32 i, flags;
 
+	if (head->flags & ~UDMABUF_FLAGS_CLOEXEC)
+		return -EINVAL;
+
 	ubuf = kzalloc(sizeof(*ubuf), GFP_KERNEL);
 	if (!ubuf)
 		return -ENOMEM;
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ