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]
Date:   Thu, 14 May 2020 10:59:31 -0400
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Jeffle Xu <jefflexu@...ux.alibaba.com>
Cc:     jack@...e.cz, linux-ext4@...r.kernel.org,
        joseph.qi@...ux.alibaba.com
Subject: Re: [PATCH v2] ext4: fix error pointer dereference

On Thu, Apr 23, 2020 at 03:46:44PM +0800, Jeffle Xu wrote:
> Don't pass error pointers to brelse().
> 
> commit 7159a986b420 ("ext4: fix some error pointer dereferences") has fixed
> some cases, fix the remaining one case.
> 
> Once ext4_xattr_block_find()->ext4_sb_bread() failed, error pointer is
> stored in @bs->bh, which will be passed to brelse() in the cleanup
> routine of ext4_xattr_set_handle(). This will then cause a NULL panic
> crash in __brelse().
> 
> BUG: unable to handle kernel NULL pointer dereference at 000000000000005b
> RIP: 0010:__brelse+0x1b/0x50
> Call Trace:
>  ext4_xattr_set_handle+0x163/0x5d0
>  ext4_xattr_set+0x95/0x110
>  __vfs_setxattr+0x6b/0x80
>  __vfs_setxattr_noperm+0x68/0x1b0
>  vfs_setxattr+0xa0/0xb0
>  setxattr+0x12c/0x1a0
>  path_setxattr+0x8d/0xc0
>  __x64_sys_setxattr+0x27/0x30
>  do_syscall_64+0x60/0x250
>  entry_SYSCALL_64_after_hwframe+0x49/0xbe
> 
> In this case, @bs->bh stores '-EIO' actually.
> 
> Fixes: fb265c9cb49e ("ext4: add ext4_sb_bread() to disambiguate ENOMEM cases")
> Signed-off-by: Jeffle Xu <jefflexu@...ux.alibaba.com>
> Reviewed-by: Joseph Qi <joseph.qi@...ux.alibaba.com>
> Cc: stable@...nel.org # 2.6.19
> Reviewed-by: Ritesh Harjani <riteshh@...ux.ibm.com>
> Reviewed-by: Jan Kara <jack@...e.cz>

Applied, thanks.

						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ