From: Benoit Timbert <Benoit.TIMBERT@free.fr>
To: linux-kernel@vger.kernel.org
Cc: security@isec.pl
Subject: [PATCH] d_path()
Date: Thu, 28 Mar 2002 01:35:15 +0100 [thread overview]
Message-ID: <20020328013515.A1636@bluebloup.bloup.uv> (raw)
Hello,
I have found this advisory on BUGTRAQ about d_path() :
http://online.securityfocus.com/archive/1/264117
I have made the following modifications in the d_path() of
Linux 2.2.20 : d_path() return an empty string when the path is
too large.
--- /usr/src/linux/fs/dcache.c.orig Fri Nov 2 17:39:08 2001
+++ /usr/src/linux/fs/dcache.c Wed Mar 27 23:30:32 2002
@@ -794,8 +794,11 @@
break;
namelen = dentry->d_name.len;
buflen -= namelen + 1;
- if (buflen < 0)
+ if (buflen < 0) {
+ /* FIXME : buffer overflow -> no return */
+ retval = buffer+buflen;
break;
+ }
end -= namelen;
memcpy(end, dentry->d_name.name, namelen);
*--end = '/';
---
I don't know, if it really fixes well the problem, but i tested the
proposed exploit on my patched kernel and getcwd() does return an error.
It is probable that you have already fixed this, in a better way.
Benoît Timbert
next reply other threads:[~2002-03-28 0:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-28 0:35 Benoit Timbert [this message]
2002-03-28 0:42 ` is http://bkbits.net down? Petko Manolov
2002-03-28 0:43 ` David S. Miller
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=20020328013515.A1636@bluebloup.bloup.uv \
--to=benoit.timbert@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=security@isec.pl \
/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
all inboxes | Powered by JetHome®