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-next>] [day] [month] [year] [list]
Date:	Mon, 06 Aug 2012 13:05:53 -0700
From:	Jim Keniston <jkenisto@...ibm.com>
To:	tytso@....edu, linux-ext4@...r.kernel.org
Cc:	ddstreet@...ibm.com, mcao@...ibm.com, alexfr@...ibm.com
Subject: [PATCH] e2fsprogs: e2fsck_handle_read_error - pass along negative
	count

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@...ibm.com>
Signed-off-by: Dan Streetman <ddstreet@...ibm.com>
Reviewed-by: Mingming Cao <mcao@...ibm.com>
Reported-by: Alex Friedman <alexfr@...ibm.com>
---

 e2fsck/ehandler.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/e2fsck/ehandler.c b/e2fsck/ehandler.c
index 6eecf33..6dddf9c 100644
--- a/e2fsck/ehandler.c
+++ b/e2fsck/ehandler.c
@@ -60,7 +60,7 @@ static errcode_t e2fsck_handle_read_error(io_channel channel,
 	preenhalt(ctx);
 	if (ask(ctx, _("Ignore error"), 1)) {
 		if (ask(ctx, _("Force rewrite"), 1))
-			io_channel_write_blk64(channel, block, 1, data);
+			io_channel_write_blk64(channel, block, count, data);
 		return 0;
 	}
 

--
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