All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Jim Keniston <jkenisto@us.ibm.com>
Cc: linux-ext4@vger.kernel.org, ddstreet@us.ibm.com, mcao@us.ibm.com,
	alexfr@il.ibm.com
Subject: Re: [PATCH] e2fsprogs: e2fsck_handle_read_error - pass along negative count
Date: Mon, 6 Aug 2012 18:55:17 -0400	[thread overview]
Message-ID: <20120806225517.GC30677@thunk.org> (raw)
In-Reply-To: <20120806200553.9312.52751.stgit@localhost.localdomain>

On Mon, Aug 06, 2012 at 01:05:53PM -0700, Jim Keniston wrote:
> When passed a negative count (indicating a byte count rather than
> a block count) e2fsck_handle_read_error() treats the data as a full
> block, causing unix_write_blk64() (which can handle negative counts
> just fine) to try to write too much.  Given a faulty block device,
> this resulted in a SEGV when unix_write_blk64() read past the bottom
> of the stack copying the data to cache.  (check_backup_super_block ->
> unix_read_blk64 -> raw_read_blk -> e2fsck_handle_read_error)
> 
> Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
> Signed-off-by: Dan Streetman <ddstreet@us.ibm.com>
> Reviewed-by: Mingming Cao <mcao@us.ibm.com>
> Reported-by: Alex Friedman <alexfr@il.ibm.com>

Thanks, applied!  I changed the one-line summary to read:

e2fsck: fix potential segv when handling a read error in a superblock

	    	      	   		 - Ted

      reply	other threads:[~2012-08-06 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06 20:05 [PATCH] e2fsprogs: e2fsck_handle_read_error - pass along negative count Jim Keniston
2012-08-06 22:55 ` Theodore Ts'o [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120806225517.GC30677@thunk.org \
    --to=tytso@mit.edu \
    --cc=alexfr@il.ibm.com \
    --cc=ddstreet@us.ibm.com \
    --cc=jkenisto@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mcao@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.