mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: TJ <linux@tjworld.net>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Neil Brown <neilb@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] filesystem: Disk Errors at boot-time caused by probe of partitions
Date: Thu, 1 Feb 2007 14:26:48 -0800	[thread overview]
Message-ID: <20070201142648.7d16e4b6.akpm@osdl.org> (raw)
In-Reply-To: <1170287439.13764.24.camel@butch.lan.tjworld.net>

On Wed, 31 Jan 2007 23:50:39 +0000
TJ <linux@tjworld.net> wrote:

> +		if (!insane && is_extended_partition(p)) { /* check the extended partition */
> +			data = read_dev_sector(bdev, START_SECT(p)*sector_size, &sect); /* fetch sector from cache */
> +			if (data) {
> +				if (msdos_magic_present(data + 510)) { /* check for signature */
> +					ext = (struct partition *) (data + 0x1be);
> +					ret = check_sane_values(ext, bdev); /* recursive call */

The recursion is a concern.  Is there any way in which a cunningly-crafted
device can cause sufficiently deep recursion to crash the kernel?

Also, from reading the replies I think we'd like to see some more
explanation of why this is necessary: are you really really sure that those
disks were incorrectly handling illegal sector numbers?  Knowing the IBM
and Maxtor model numbers might be useful.

I assume you were using a driver in drivers/ide/?  Perhaps this is really
an IDE-layer bug.

  reply	other threads:[~2007-02-01 22:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-31 23:50 TJ
2007-02-01 22:26 ` Andrew Morton [this message]
2007-02-01 22:47   ` Eric D. Mudama
2007-02-01 23:50   ` TJ
2007-02-02  0:10     ` Eric D. Mudama
2007-02-02  0:25       ` TJ
2007-02-01  1:50 TJ
     [not found] <fa.vUjkpPQXmle+uox6D228qG85KCU@ifi.uio.no>
2007-02-01  4:20 ` Robert Hancock
2007-02-01 11:27   ` TJ
2007-02-01 19:12     ` Phillip Susi
2007-02-01 20:42       ` Alan

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=20070201142648.7d16e4b6.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@tjworld.net \
    --cc=neilb@suse.de \
    /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

Powered by JetHome