public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Eric Sesterhenn <snakebyte@gmx.de>
Cc: linux-kernel@vger.kernel.org, zippel@linux-m68k.org
Subject: Re: [Patch] hfs: fix namelength memory corruption
Date: Mon, 8 Sep 2008 17:14:50 -0700	[thread overview]
Message-ID: <20080908171450.e57e6fcf.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080908133505.GA3031@alice>

On Mon, 8 Sep 2008 15:35:05 +0200
Eric Sesterhenn <snakebyte@gmx.de> wrote:

> hi,
> 
> this is basically the same as
> hfsplus-fix-buffer-overflow-with-a-corrupted-image.patch.

I can't really use the above text in a changelog.  Think how it will
look in git in two years time.

> We use the length parameter for a memcopy without checking it and
> thereby corruption memory. 

"corrupting".

I assume that this bug was found using a deliberately corrupted
filesystem?  If so, that sort of thing should be described in the
changelog.

Please spend a little more time (say, 60 seconds) preparing patch
descriptions.


> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
> 
> --- linux/fs/hfs/catalog.c.orig	2008-09-08 15:20:15.000000000 +0200
> +++ linux/fs/hfs/catalog.c	2008-09-08 15:21:02.000000000 +0200
> @@ -190,6 +190,10 @@ int hfs_cat_find_brec(struct super_block
>  
>  	fd->search_key->cat.ParID = rec.thread.ParID;
>  	len = fd->search_key->cat.CName.len = rec.thread.CName.len;
> +	if (len > HFS_NAMELEN) {
> +		printk(KERN_ERR "hfs: bad catalog namelength\n");
> +		return -EIO;
> +	}
>  	memcpy(fd->search_key->cat.CName.name, rec.thread.CName.name, len);
>  	return hfs_brec_find(fd);
>  }

Please send a full changelog for this patch.

I can (and often do) end up writing these things myself, but it's not a
very satisfactory arrangement, particularly when I'm not provided with
sufficient information to do so.

Thanks.

  reply	other threads:[~2008-09-09  0:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 13:35 [Patch] hfs: fix namelength memory corruption Eric Sesterhenn
2008-09-09  0:14 ` Andrew Morton [this message]
2008-09-09  2:02 ` David Wagner

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=20080908171450.e57e6fcf.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snakebyte@gmx.de \
    --cc=zippel@linux-m68k.org \
    /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