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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 22 Mar 2020 20:06:48 +0800
From:   Qiujun Huang <anenbupt@...il.com>
To:     syzbot <syzbot+4a88b2b9dc280f47baf4@...kaller.appspotmail.com>
Cc:     aeb@....nl, danarag@...il.com, kstewart@...uxfoundation.org,
        linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com,
        tglx@...utronix.de, viro@...iv.linux.org.uk
Subject: Re: KASAN: null-ptr-deref Write in get_block

Need to check the return value of sb_getblk.

Signed-off-by: Qiujun Huang <hqjagain@...il.com>
---
 fs/minix/itree_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/minix/itree_common.c b/fs/minix/itree_common.c
index 043c3fd..eedd79f 100644
--- a/fs/minix/itree_common.c
+++ b/fs/minix/itree_common.c
@@ -85,6 +85,8 @@ static int alloc_branch(struct inode *inode,
  break;
  branch[n].key = cpu_to_block(nr);
  bh = sb_getblk(inode->i_sb, parent);
+ if (!bh)
+ break;
  lock_buffer(bh);
  memset(bh->b_data, 0, bh->b_size);
  branch[n].bh = bh;
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ