public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Willy Tarreau <w@1wt.eu>
Cc: dann frazier <dannf@dannf.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.4: fix memory corruption from misinterpreted bad_inode_ops return values
Date: Thu, 24 Jan 2008 15:06:58 -0600	[thread overview]
Message-ID: <4798FDF2.3000605@redhat.com> (raw)
In-Reply-To: <20080124195624.GJ8953@1wt.eu>

Willy Tarreau wrote:
> Hi Dann,
> 
> On Wed, Jan 23, 2008 at 11:12:12PM -0700, dann frazier wrote:
>> This is a 2.4 backport of a linux-2.6 change by Eric Sandeen
>> (commit be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8)
>>
>> CVE-2006-5753 was assigned for this issue.
>>
>> I've built and boot-tested this, but I'm not sure how to exercise
>> these codepaths.
> 
> I have no idea either. Let's consider that if nobody on the list knows
> how to do so, I'll merge it since you did not notice any regression.
> 
> Thanks,
> Willy
> 

Sorry... here you go.  Forgot to post this sooner.  I hit it with
this on 2.6.x


#include <stdio.h>
#include <sys/types.h>
#include <sys/errno.h>

static int return_EIO(void)
{
        return -EIO;
}

int main(int argc, char ** argv)
{
	ssize_t error;
	ssize_t realerror = -EIO;
	ssize_t (*fn_ptr)(void);

	fn_ptr = (void *)return_EIO;

	error = (ssize_t)fn_ptr();
	printf("and... error is %ld, should be %ld\n", error, realerror);
	return 0;
}

-Eric

  reply	other threads:[~2008-01-24 21:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-24  6:12 [PATCH] 2.4: fix memory corruption from misinterpreted bad_inode_ops return values dann frazier
2008-01-24 19:56 ` Willy Tarreau
2008-01-24 21:06   ` Eric Sandeen [this message]
2008-01-24 22:39     ` dann frazier
2008-01-24 22:48       ` Eric Sandeen
2008-01-25  4:53         ` Willy Tarreau

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=4798FDF2.3000605@redhat.com \
    --to=sandeen@redhat.com \
    --cc=dannf@dannf.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=w@1wt.eu \
    /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