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]
Date:   Thu, 27 Apr 2023 23:15:59 -0400
From:   "Theodore Ts'o" <tytso@....edu>
To:     Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc:     Andreas Dilger <adilger@...ger.ca>,
        Jason Yan <yanaijie@...wei.com>,
        "Theodore Ts'o" <tytso@....edu>
Subject: [PATCH 0/3] ext4: clean up error handling

The recent code cleanup of __ext4_fill_super() resulted in a bug
reported by Syzkaller.  When I investigated this issue, I found that
the bug was caused by a fragile and partially redundant way error
codes were set to be returned by the __ext4_fill_super() function.

The first patch fixes the bug found by Syzkaller, and the second and
third patch cleans up the error handling in __ext4_fill_super() and
__ext4_multi_mount_protect().

Andreas, please take a look at the second patch, as it changes the
error codes returned in various cases when the MMP feature prevents
the file system from being mounted and other failure cases.  For
example, when another system has the file system mounted, mount will
now return EBUSY instead EINVAL.  In other cases, if a memory
allocation fails, mount will now return ENOMEM instead of EINVAL.  I
think this is an improvement, but there might be some userspace code
that might get confused by this.  Since Lustre users tend to be most
common users of the MMP feature, I'd appreciate your review of this
patch.


Theodore Ts'o (3):
  ext4: fix lost error code reporting in __ext4_fill_super()
  ext4: reflect error codes from ext4_multi_mount_protect() to its
    callers
  ext4: clean up error handling in __ext4_fill_super()

 fs/ext4/mmp.c   |  9 ++++++-
 fs/ext4/super.c | 68 +++++++++++++++++++++++++++++--------------------
 2 files changed, 48 insertions(+), 29 deletions(-)

-- 
2.31.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ