From: Andrew Morton <akpm@osdl.org>
To: Nikita Danilov <Nikita@Namesys.COM>
Cc: linux-kernel@vger.kernel.org, ltp-list@lists.sourceforge.net,
error27@email.com
Subject: Re: [Announce] Strace Test
Date: Thu, 19 Feb 2004 02:38:13 -0800 [thread overview]
Message-ID: <20040219023813.2d4b0ced.akpm@osdl.org> (raw)
In-Reply-To: <16436.35563.593635.277584@laputa.namesys.com>
Nikita Danilov <Nikita@Namesys.COM> wrote:
>
> > Strace Test uses a modified version of strace 4.5.1.
> > Instead of printing out information about system calls,
> > the modified version calls the syscalls with improper
> > values.
>
> It immediately DoSes kernel by calling sys_sysctl() with huge nlen:
> printk() consumes all CPU.
Something like this?
--- 25/kernel/sysctl.c~sysctl-nlen-check 2004-02-19 02:36:20.000000000 -0800
+++ 25-akpm/kernel/sysctl.c 2004-02-19 02:37:40.000000000 -0800
@@ -913,6 +913,9 @@ asmlinkage long sys_sysctl(struct __sysc
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
+
+ if (tmp.nlen < 0 || tmp.nlen > CTL_MAXNAME)
+ return -EINVAL;
if (tmp.nlen != 2 || copy_from_user(name, tmp.name, sizeof(name)) ||
name[0] != CTL_KERN || name[1] != KERN_VERSION) {
_
next prev parent reply other threads:[~2004-02-19 10:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-16 5:22 [Announce] Strace Test dan carpenter
2004-02-16 6:59 ` Anton Blanchard
2004-03-11 9:53 ` Chris Wedgwood
2004-02-16 15:46 ` [LTP] " Robert Williamson
2004-02-19 10:07 ` Nikita Danilov
2004-02-19 10:38 ` Andrew Morton [this message]
2004-02-19 10:51 ` Nikita Danilov
2004-02-19 10:59 ` Andrew Morton
2004-02-19 10:29 ` David Weinehall
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=20040219023813.2d4b0ced.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=Nikita@Namesys.COM \
--cc=error27@email.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ltp-list@lists.sourceforge.net \
/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