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
:
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Ingo Molnar
Re: [RFT] x86 acpi: normalize segment descriptor register on resume
Andrew Morton
-mm merge plans for 2.6.23
Greg Kroah-Hartman
[PATCH 004/196] Chinese: add translation of SubmittingPatches
git
:
linux-netdev
:
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
David Miller
Re: [GIT]: Networking
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Ingo Molnar
[bug] stuck localhost TCP connections, v2.6.26-rc3+
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
8 users
and
888 guests
online.
Online users
dtv309
umbent30
zeekec
megafoxy31
sreejithc
johcutajar
elecytrtert4
RobM2010
Syndicate