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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <d99f78a7-31c4-582e-17f5-93e1f0d0e4c2@virtuozzo.com>
Date:   Tue, 23 Jul 2019 09:33:35 +0300
From:   Vasily Averin <vvs@...tuozzo.com>
To:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Miklos Szeredi <miklos@...redi.hu>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: [PATCH] fuse: BUG_ON's correction in fuse_dev_splice_write()

commit 963545357202 ("fuse: reduce allocation size for splice_write")
changed size of bufs array, so first BUG_ON should be corrected too.
Second BUG_ON become useless, first one also includes the second check:
any unsigned nbuf value cannot be less than 0.

Fixes: 963545357202 ("fuse: reduce allocation size for splice_write")
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
 fs/fuse/dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index ea8237513dfa..311c7911271c 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -2064,8 +2064,7 @@ static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe,
 		struct pipe_buffer *ibuf;
 		struct pipe_buffer *obuf;
 
-		BUG_ON(nbuf >= pipe->buffers);
-		BUG_ON(!pipe->nrbufs);
+		BUG_ON(nbuf >= pipe->nrbufs);
 		ibuf = &pipe->bufs[pipe->curbuf];
 		obuf = &bufs[nbuf];
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ