Skip to contentSkip to conversation

Linux 2.6.17.4

DISCUSSION Greg KH 8 participants 13 messages Jul 6, 2006 – Jul 7, 2006 Kbuild

lore
Share & tools
lore

Greg KH

author
#0 lore raw

We (the -stable team) are announcing the release of the 2.6.17.4 kernel.

I'll also be replying to this message with a copy of the patch between 2.6.17.3 and 2.6.17.4, as it is small enough to do so.

The updated 2.6.17.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.17.y.git
and can be browsed at the normal kernel.org git web browser:
www.kernel.org/git/

thanks,

greg k-h

--------

 Makefile     |    2 +-
 kernel/sys.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Summary of changes from v2.6.17.3 to v2.6.17.4
==============================================

Greg Kroah-Hartman:
fix prctl privilege escalation and suid_dumpable (CVE-2006-2451) Linux 2.6.17.4

author
#1 lore raw
Makefile +1 -1
index 8c72521..abcf2d7 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 17
-EXTRAVERSION = .3
+EXTRAVERSION = .4
 NAME=Crazed Snow-Weasel
 
 # *DOCUMENTATION*
kernel/sys.c +1 -1
index 0b6ec0e..59273f7 100644
@@ -1991,7 +1991,7 @@ asmlinkage long sys_prctl(int option, un
 			error = current->mm->dumpable;
 			break;
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}
#2 lore raw
Quoted 18 lines · Greg KH
Makefile +1 -1
index 8c72521..abcf2d7 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 17
-EXTRAVERSION = .3
+EXTRAVERSION = .4
 NAME=Crazed Snow-Weasel
 
 # *DOCUMENTATION*
kernel/sys.c +0 -0
index 0b6ec0e..59273f7 100644

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 8 lines
kernel/sys.c +1 -1
@@ -1991,7 +1991,7 @@ asmlinkage long sys_prctl(int option, un
 			error = current->mm->dumpable;
 			break;
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Just curious as to why this isn't just
...

			if (arg2 != 1) {

...

Thanks,

Scott.

author
#3 lore raw
Quoted 29 lines · Scott J. Harmon
Quoted 18 lines · Greg KH
Makefile +1 -1
index 8c72521..abcf2d7 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 17
-EXTRAVERSION = .3
+EXTRAVERSION = .4
 NAME=Crazed Snow-Weasel
 
 # *DOCUMENTATION*
kernel/sys.c +0 -0
index 0b6ec0e..59273f7 100644

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 8 lines
kernel/sys.c +1 -1
@@ -1991,7 +1991,7 @@ asmlinkage long sys_prctl(int option, un
 			error = current->mm->dumpable;
 			break;
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Just curious as to why this isn't just
...

Quoted 2 lines
			if (arg2 != 1) {

...

Because that would be incorrect :)

thanks,

greg k-h

#4 lore raw
Quoted 33 lines · Greg KH
Quoted 29 lines · Scott J. Harmon
Quoted 18 lines · Greg KH
Makefile +1 -1
index 8c72521..abcf2d7 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 17
-EXTRAVERSION = .3
+EXTRAVERSION = .4
 NAME=Crazed Snow-Weasel
 
 # *DOCUMENTATION*
kernel/sys.c +0 -0
index 0b6ec0e..59273f7 100644

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 8 lines
kernel/sys.c +1 -1
@@ -1991,7 +1991,7 @@ asmlinkage long sys_prctl(int option, un
 			error = current->mm->dumpable;
 			break;
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Just curious as to why this isn't just
...

Quoted 2 lines
			if (arg2 != 1) {

...

Quoted 5 lines

Because that would be incorrect :)

thanks,

greg k-h

DOH!

/me hides under a rock

Thanks,

Scott.

#5 lore raw
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 6 lines
kernel/sys.c +1 -1
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Just curious as to why this isn't just
...

			if (arg2 != 1) {

...

Quoted 4 lines
Quoted 1 line

Because that would be incorrect :)

DOH!
/me hides under a rock

That's quite a good one.

Jan Engelhardt

#6 lore raw
In reply to Greg KH
Quoted 33 lines · Greg KH
Quoted 29 lines · Scott J. Harmon
Quoted 18 lines · Greg KH
Makefile +1 -1
index 8c72521..abcf2d7 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 17
-EXTRAVERSION = .3
+EXTRAVERSION = .4
 NAME=Crazed Snow-Weasel
 
 # *DOCUMENTATION*
kernel/sys.c +0 -0
index 0b6ec0e..59273f7 100644

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 8 lines
kernel/sys.c +1 -1
@@ -1991,7 +1991,7 @@ asmlinkage long sys_prctl(int option, un
 			error = current->mm->dumpable;
 			break;
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Just curious as to why this isn't just
...

Quoted 2 lines
			if (arg2 != 1) {

...

Quoted 1 line

Because that would be incorrect :)

Interestingly, 2.4 tests (arg2 !=0 && arg2 != 1) so from the code changes above, it looks like the value 2 was added on purpose, but for what ? Maybe the fix is not really correct yet ?

Cheers,
Willy

Quoted 9 lines

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#7 lore raw
Quoted 34 lines · Willy Tarreau
Quoted 33 lines · Greg KH
Quoted 31 lines · Scott J. Harmon
Quoted 18 lines · Greg KH
Makefile +1 -1
index 8c72521..abcf2d7 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 17
-EXTRAVERSION = .3
+EXTRAVERSION = .4
 NAME=Crazed Snow-Weasel
 
 # *DOCUMENTATION*
kernel/sys.c +0 -0
index 0b6ec0e..59273f7 100644

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 8 lines
kernel/sys.c +1 -1
@@ -1991,7 +1991,7 @@ asmlinkage long sys_prctl(int option, un
 			error = current->mm->dumpable;
 			break;
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Just curious as to why this isn't just
...

			if (arg2 != 1) {

...

Quoted 5 lines
Quoted 1 line

Because that would be incorrect :)

Interestingly, 2.4 tests (arg2 !=0 && arg2 != 1) so from the code changes above, it looks like the value 2 was added on purpose, but for what ? Maybe the fix is not really correct yet ?

No, it's correct. The change was incorrect.

thanks,

greg k-h

#8 lore raw
In reply to Willy Tarreau
Quoted 3 lines · * Willy Tarreau ([email protected]) wrote:

Interestingly, 2.4 tests (arg2 !=0 && arg2 != 1) so from the code changes above, it looks like the value 2 was added on purpose, but for what ? Maybe the fix is not really correct yet ?

The old code was changed to support a new feature (suid_dumpable for debugging). The sysctl should support 2 (the new value), but the prctl can be abused and hence reducing the test to one analgous to 2.4. This is a correct fix.

thanks,
-chris

#9 lore raw
In reply to Willy Tarreau
Quoted 3 lines · Willy Tarreau

Interestingly, 2.4 tests (arg2 !=0 && arg2 != 1) so from the code changes above, it looks like the value 2 was added on purpose, but for what ? Maybe the fix is not really correct yet ?

Hence the source of my curiosity. My prctl() manpage says that 2 makes a core that is only readable by root.

PR_SET_DUMPABLE
(Since Linux 2.4) Set the state of the flag determining whether core dumps are produced for this process upon delivery of a sig- nal whose default behaviour is to produce a core dump. (Nor- mally this flag is set for a process by default, but it is cleared when a set-user-ID or set-group-ID program is executed and also by various system calls that manipulate process UIDs and GIDs). In kernels up to and including 2.6.12, arg2 must be either 0 (process is not dumpable) or 1 (process is dumpable). Since kernel 2.6.13, the value 2 is also permitted; this causes any binary which normally would not be dumped to be dumped read-
able by root only. (See also the description of
/proc/sys/fs/suid_dumpable in proc(5).)

Quoted 2 lines

Cheers,
Willy

Thanks,
Chase

#10 lore raw
In reply to Greg KH

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 6 lines · Greg KH
kernel/sys.c +1 -1
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Am I staring at this crooked, or not looking deep enough? My manual page for prctl says 2 is valid there. Specifically:

Since kernel 2.6.13, the value 2 is also permitted; this causes any binary which normally would not be dumped to be dumped read-
able by root only. (See also the description of
/proc/sys/fs/suid_dumpable in proc(5).)

...has something changed, and my manpages don't reflect it? Did I miss a conversation about this?

Thanks,
Chase

#11 lore raw
Quoted 11 lines · Chase Venters

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 6 lines · Greg KH
kernel/sys.c +1 -1
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Am I staring at this crooked, or not looking deep enough? My manual page for prctl says 2 is valid there. Specifically:

Quoted 7 lines

Since kernel 2.6.13, the value 2 is also permitted; this causes any binary which normally would not be dumped to be dumped read-
able by root only. (See also the description of
/proc/sys/fs/suid_dumpable in proc(5).)

...has something changed, and my manpages don't reflect it? Did I miss a conversation about this?

Please refer to the CVE number for details.

thanks,

greg k-h

#12 lore raw
In reply to Chase Venters

Hi Chase,

Quoted 10 lines

kernel/sys.c asmlinkage long sys_prctl(int option, un · line 1997

Quoted 6 lines
kernel/sys.c +1 -1
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 2) {
+			if (arg2 < 0 || arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}

Am I staring at this crooked, or not looking deep enough? My manual page for prctl says 2 is valid there. Specifically:

Quoted 7 lines

Since kernel 2.6.13, the value 2 is also permitted; this causes any binary which normally would not be dumped to be dumped read-
able by root only. (See also the description of
/proc/sys/fs/suid_dumpable in proc(5).)

...has something changed, and my manpages don't reflect it? Did I miss a conversation about this?

the manual page must change. This paragraph must be removed.

Regards

Marcel