login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
November
»
13
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: Tetsuo Handa <penguin-kernel@...>
Cc: <ebiederm@...>, <linux-kernel@...>
Subject:
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
Date: Monday, November 12, 2007 - 11:13 pm
On Tue, 13 Nov 2007 12:07:23 +0900 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
quoted text
> Andrew, please replace previous patch with this one. > This one returns -ENOTDIR. > ---------- > > Original patch forgot to check args->nlen. > I don't know why args->nlen == CTL_MAXNAME is rejected, > but it has been rejected traditionally. > > Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> > Cc: "Eric W. Biederman" <ebiederm@xmission.com> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > --- > > kernel/sysctl.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff -puN kernel/sysctl.c~sysctl-check-length-at-deprecated_sysctl_warning kernel/sysctl.c > --- a/kernel/sysctl.c~sysctl-check-length-at-deprecated_sysctl_warning > +++ a/kernel/sysctl.c > @@ -2609,6 +2609,10 @@ static int deprecated_sysctl_warning(str > int name[CTL_MAXNAME]; > int i; > > + /* Check args->nlen. */ > + if (args->nlen <= 0 || args->nlen >= CTL_MAXNAME)
I believe (args->nlen > CTL_MAXNAME) was correct.
quoted text
> + return -ENOTDIR;
Ho hum. Why does that code return -ENOTDIR on error anyway?
quoted text
> + > /* Read in the sysctl name for better debug message logging */ > for (i = 0; i < args->nlen; i++) > if (get_user(name[i], args->name + i))
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Tetsuo Handa
, (Wed Nov 7, 10:57 pm)
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Andrew Morton
, (Wed Nov 7, 11:22 pm)
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Tetsuo Handa
, (Thu Nov 8, 4:19 am)
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Eric W. Biederman
, (Mon Nov 12, 5:44 am)
[PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Tetsuo Handa
, (Mon Nov 12, 11:07 pm)
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Andrew Morton
, (Mon Nov 12, 11:13 pm)
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Tetsuo Handa
, (Mon Nov 12, 11:50 pm)
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Eric W. Biederman
, (Tue Nov 13, 9:24 am)
Re: [PATCH] sysctl: Check length at deprecated_sysctl_warning.
, Tetsuo Handa
, (Mon Nov 12, 7:42 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Pierre Ossman
Re: [RFC][PATCH] cpuidle: avoid singing capacitors
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Greg KH
Re: Announce: Linux-next (Or Andrew's dream :-))
Rene Herman
2.6.26, PAT and AMD family 6
git
:
linux-netdev
:
Jesper Krogh
Re: NIU - Sun Neptune 10g - Transmit timed out reset (2.6.24)
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Arjan van de Ven
Re: [GIT]: Networking
Radu Rendec
htb parallelism on multi-core platforms
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
916 guests
online.
Online users
satellite888
Syndicate