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]
Message-ID: <20140402153217.GC6901@thunk.org>
Date:	Wed, 2 Apr 2014 11:32:17 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Matthew Wilcox <willy@...ux.intel.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: Ensure that inode is non-NULL before calling
 ext4_error_inode

On Wed, Apr 02, 2014 at 10:36:30AM -0400, Matthew Wilcox wrote:
> 
> __ext4_handle_dirty_metadata can be called with a NULL inode, but
> ext4_error_inode can't.  This is supposed to be a "can't happen" path,
> so we need to find out whether it can legitimately happen or whether
> there's some other bug that is causing this to happen.  This prevents
> a NULL pointer reference, so it should be included regardless of what
> the underlying error is.
> 
> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@...el.com>

This was fixed by the following commit which will be shortly
pushed to Linus.  Admittedly, I should have done a better job noting
it in the commit description (sorry about that):

http://git.kernel.org/cgit/linux/kernel/git/tytso/ext4.git/commit/?h=dev&id=0edaa0178ea7142691ae9c10baa42b3e6466d047

In my patch I made sure we printed something so there would be better
chance of debugging the problem:

+			if (inode == NULL) {
+				pr_err("EXT4: jbd2_journal_dirty_metadata "
+				       "failed: handle type %u started at "
+				       "line %u, credits %u/%u, errcode %d",
+				       handle->h_type,
+				       handle->h_line_no,
+				       handle->h_requested_credits,
+				       handle->h_buffer_credits, err);
+				return err;
+			}

It turns out this case does happen if we are journalling fs-level
metadata, such as block group descriptor.

				- Ted

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ