From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
"Theodore Ts'o" <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, sandeen@redhat.com,
Roman Zippel <zippel@linux-m68k.org>,
Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
Chris Wright <chrisw@sous-sol.org>
Subject: [patch 08/18] hfs_fill_super returns success even if no root inode (CVE-2006-6056)
Date: Tue, 20 Feb 2007 17:50:28 -0800 [thread overview]
Message-ID: <20070221015028.GI3684@kroah.com> (raw)
In-Reply-To: <20070221014927.GA3684@kroah.com>
[-- Attachment #1: hfs_fill_super-returns-success-even-if-no-root-inode.patch --]
[-- Type: text/plain, Size: 2186 bytes --]
-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Sandeen <sandeen@redhat.com>
http://kernelfun.blogspot.com/2006/11/mokb-14-11-2006-linux-26x-selinux.html
mount that image...
fs: filesystem was not cleanly unmounted, running fsck.hfs is recommended. mounting read-only.
hfs: get root inode failed.
BUG: unable to handle kernel NULL pointer dereference at virtual address 00000018
printing eip
...
EIP is at superblock_doinit+0x21/0x767
...
[] selinux_sb_kern_mount+0xc/0x4b
[] vfs_kern_mount+0x99/0xf6
[] do_kern_mount+0x2d/0x3e
[] do_mount+0x5fa/0x66d
[] sys_mount+0x77/0xae
[] syscall_call+0x7/0xb
DWARF2 unwinder stuck at syscall_call+0x7/0xb
hfs_fill_super() returns success even if
root_inode = hfs_iget(sb, &fd.search_key->cat, &rec);
or
sb->s_root = d_alloc_root(root_inode);
fails. This superblock finds its way to superblock_doinit() which does:
struct dentry *root = sb->s_root;
struct inode *inode = root->d_inode;
and boom. Need to make sure the error cases return an error, I think.
[akpm@osdl.org: return -ENOMEM on oom]
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
Date: Thu, 16 Nov 2006 09:19:22 +0000 (-0800)
Subject: [patch 08/18] [PATCH] hfs_fill_super returns success even if no root inode
X-Git-Tag: v2.6.19
X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d6ddf55440833fd9404138026af246c51ebeef22
fs/hfs/super.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.18.7.orig/fs/hfs/super.c
+++ linux-2.6.18.7/fs/hfs/super.c
@@ -391,11 +391,13 @@ static int hfs_fill_super(struct super_b
hfs_find_exit(&fd);
goto bail_no_root;
}
+ res = -EINVAL;
root_inode = hfs_iget(sb, &fd.search_key->cat, &rec);
hfs_find_exit(&fd);
if (!root_inode)
goto bail_no_root;
+ res = -ENOMEM;
sb->s_root = d_alloc_root(root_inode);
if (!sb->s_root)
goto bail_iput;
--
next prev parent reply other threads:[~2007-02-21 1:56 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070221014413.282048309@mini.kroah.org>
2007-02-21 1:49 ` [patch 00/18] 2.6.18-stable review Greg KH
2007-02-21 1:49 ` [patch 01/18] bcm43xx: Fix for oops on resume Greg KH
2007-02-23 5:25 ` Pavel Machek
2007-02-25 2:30 ` Larry Finger
2007-02-25 8:53 ` Andrew Morton
2007-02-21 1:49 ` [patch 02/18] bcm43xx: Fix for oops on ampdu status Greg KH
2007-02-21 1:49 ` [patch 03/18] Dont leak NT bit into next task Greg KH
2007-02-21 10:00 ` Giuseppe Bilotta
2007-02-21 17:14 ` Jan Engelhardt
2007-02-21 17:20 ` Chuck Ebbert
2007-02-22 15:29 ` Adrian Bunk
2007-02-22 16:56 ` Andi Kleen
2007-02-21 1:50 ` [patch 04/18] SCSI: add missing cdb clearing in scsi_execute() Greg KH
2007-02-21 1:50 ` [patch 05/18] IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G Greg KH
2007-02-21 1:50 ` [patch 06/18] i2c: fix broken ds1337 initialization Greg KH
2007-02-21 1:50 ` [patch 07/18] grow_buffers() infinite loop fix (CVE-2006-5757, CVE-2006-6060) Greg KH
2007-02-21 1:50 ` Greg KH [this message]
2007-02-21 1:50 ` [patch 09/18] IB/mad: Fix race between cancel and receive completion Greg KH
2007-02-21 1:50 ` [patch 10/18] dvb-core: fix bug in CRC-32 checking on 64-bit systems Greg KH
2007-02-21 1:50 ` [patch 11/18] v4l: cx2341x audio_properties is an u16, not u8 Greg KH
2007-02-21 1:50 ` [patch 12/18] v4l: cx88: Fix leadtek_eeprom tagging Greg KH
2007-02-21 1:51 ` [patch 13/18] V4L: cx88: Fix lockup on suspend Greg KH
2007-02-22 1:14 ` Michael Krufky
2007-02-23 23:50 ` Greg KH
2007-02-21 1:51 ` [patch 14/18] V4L: Fix quickcam communicator driver for big endian architectures Greg KH
2007-02-21 1:51 ` [patch 15/18] V4L: fix ks0127 status flags Greg KH
2007-02-21 1:51 ` [patch 16/18] V4L: tveeprom: autodetect LG TAPC G701D as tuner type 37 Greg KH
2007-02-21 1:51 ` [patch 17/18] V4L: buf_qbuf: fix videobuf_queue->stream corruption and lockup Greg KH
2007-02-21 1:51 ` [patch 18/18] x86_64: fix 2.6.18 regression - PTRACE_OLDSETOPTIONS should be accepted Greg KH
2007-02-21 11:55 ` [patch 00/18] 2.6.18-stable review S.Çağlar Onur
2007-02-21 17:34 ` [stable] " Greg KH
2007-02-21 18:30 ` S.Çağlar Onur
2007-02-21 18:45 ` Ismail Dönmez
2007-02-22 5:42 ` Willy Tarreau
2007-02-26 0:00 ` Adrian Bunk
2007-02-26 0:18 ` Adrian Bunk
2007-03-05 13:44 ` S.Çağlar Onur
2007-03-05 19:26 ` Greg KH
2007-03-05 20:13 ` S.Çağlar Onur
2007-02-23 20:21 ` Hugh Dickins
2007-02-23 20:34 ` [stable] " Chris Wright
2007-02-23 21:13 ` Hugh Dickins
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=20070221015028.GI3684@kroah.com \
--to=greg@kroah.com \
--cc=akpm@linux-foundation.org \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=chrisw@sous-sol.org \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkrufky@linuxtv.org \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=sandeen@redhat.com \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=torvalds@osdl.org \
--cc=tytso@mit.edu \
--cc=zippel@linux-m68k.org \
--cc=zwane@arm.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox