NetBSD Security-Officer | 8 Jun 2006 23:42
Picon

NetBSD Security Advisory 2006-015: FPU Information leak on i386/amd64/Xen platforms with AMD CPUs


		 NetBSD Security Advisory 2006-015
		 =================================

Topic:		FPU Information leak on i386/amd64/Xen platforms with AMD CPUs

Version:	NetBSD-current:	source prior to April 19, 2006
		NetBSD 3.0:	affected
		NetBSD 2.1:     affected
		NetBSD 2.0.*:   affected
		NetBSD 2.0:     affected

Severity:	Information leakage between local processes

Fixed:		NetBSD-current:		April 19, 2006
		NetBSD-3-0 branch:	May 12, 2006
						(3.0.1 will include the fix)
		NetBSD-3   branch:	May 12, 2006
		NetBSD-2-1 branch:      May 12, 2006
						(2.1.1 will include the fix)
		NetBSD-2-0 branch:      May 12, 2006
						(2.0.4 will include the fix)
		NetBSD-2 branch:        May 12, 2006

Abstract
========

Due to the documented behavior of AMD processors when running amd64, i386
and Xen NetBSD kernels, processors using floating point operations can leak
information.  This may allow a local attacker to gain sensitive privileged 
(Continue reading)

NetBSD Security-Officer | 8 Jun 2006 23:44
Picon

NetBSD Security Advisory 2006-016: IPv6 socket options can crash the system


		 NetBSD Security Advisory 2006-016
		 =================================

Topic:		IPv6 socket options can crash the system

Version:	NetBSD-current:	source prior to May 23, 2006
		NetBSD 3.0:	affected
		NetBSD 2.1:     affected
		NetBSD 2.0.*:   affected
		NetBSD 2.0:     affected

Severity:	Any local user can crash the system

Fixed:		NetBSD-current:		May 23, 2006
		NetBSD-3-0 branch:	May 24, 2006
						(3.0.1 will include the fix)
		NetBSD-3   branch:	May 24, 2006
		NetBSD-2-1 branch:      May 24, 2006
						(2.1.1 will include the fix)
		NetBSD-2-0 branch:      May 24, 2006
						(2.0.4 will include the fix)
		NetBSD-2 branch:        May 24, 2006

Abstract
========

Insufficient validation when parsing IPv6 socket options can lead to a
system crash.  This can be triggered by a local non-privileged user.

(Continue reading)

Jeremy C. Reed | 14 Jun 2006 04:50

su and resources not honored

src/usr.bin/su/su_pam.c has:

    * Don't touch resource/priority settings if -m has been used
    * or -l and -c hasn't, and we're not su'ing to root.
    */
   if ((asme || (!asthem && class == NULL)) && pwd->pw_uid)
           setwhat &= ~(LOGIN_SETPRIORITY|LOGIN_SETRESOURCES);

   if (setusercontext(lc, pwd, pwd->pw_uid, setwhat) == -1)
           err(EXIT_FAILURE, "setusercontext");

So using "su" (without -m for example), a user (who knows another user 
account's password) can login to that other user's account and because 
LOGIN_SETRESOURCES is not used their previous resources are in effect. Is 
that okay?

This seems like a way a user can misuse resources. Comments?

If that is acceptable behaviour it should be clearly documented. (Any 
suggestions on wording for the manual page?)

I haven't checked other operating systems yet.

Note that our login(1) does not have that problem.

 Jeremy C. Reed

Jeremy C. Reed | 14 Jun 2006 07:56

Re: check resource limits with exec(3)?

I added tech-kern to this as I have a patch for kernel below related to 
this. (Also included are parts of a few emails below for some context.)
Below are two patches (one for kernel) and replies to a couple emails.
I also added tech-security for discussion on the actual security 
issues this involves.

On Tue, 6 Jun 2006, Iain Hibbert wrote to tech-userlevel:

> > Or is it acceptable for programs to go over (ignore) the defined maxproc?
> 
> If it is actually a problem, then I would say that the correct place to
> check it would be under setuid() somewhere (probably do_setresuid() in
> sys/kern/kern_prot.c?), and return EPROCLIM if the operation would exceed
> limits.  I couldnt say if that would have other implications though..

On Thu, 8 Jun 2006, Daniel Carosone wrote to tech-userlevel:

> On Wed, Jun 07, 2006 at 09:31:12PM +0100, David Laight wrote:
> > All the places where those calls are assumed to succeed because there
> > is no way they can fail...
> 
> This discussion comes about in part because of a discovery, on another
> platform, of a way they can fail.

Exactly. I was testing some security issues found on Linux caused by 
setuid failing (where a user could easily get root). I couldn't reproduce 
same issue on NetBSD but came across a different issue.

Here is what I have been using:

(Continue reading)

NetBSD Security-Officer | 14 Jun 2006 23:42
Picon

NetBSD Security Advisory 2006-017: Sendmail malformed multipart MIME messages


		 NetBSD Security Advisory 2006-017
		 =================================

Topic:		Sendmail malformed multipart MIME messages

Version:	NetBSD-current:	source prior to May 30, 2006
		NetBSD 3.0:	affected
		NetBSD 2.1:	affected
		NetBSD 2.0.*:	affected
		NetBSD 2.0:	affected
		pkgsrc:		sendmail-8.13.6nb2 and earlier
				sendmail-8.12.11nb2 and earlier

Severity:	Denial of service

Fixed:		NetBSD-current:		May 30, 2006
		NetBSD-3-0 branch:	June 14, 2006
					   (3.0.1 will include the fix)
		NetBSD-3   branch:	June 14, 2006
		NetBSD-2-1 branch:	June 14, 2006
					   (2.1.1 will include the fix)
		NetBSD-2-0 branch:	June 14, 2006
					   (2.0.4 will include the fix)
		NetBSD-2   branch:	June 14, 2006
		pkgsrc:			sendmail-8.13.6nb3 corrects this issue
					sendmail-8.12.11nb3 corrects this issue

Abstract
========
(Continue reading)

Bill Studenmund | 15 Jun 2006 02:21
Picon

Re: su and resources not honored

On Tue, Jun 13, 2006 at 07:50:59PM -0700, Jeremy C. Reed wrote:
> src/usr.bin/su/su_pam.c has:
> 
>     * Don't touch resource/priority settings if -m has been used
>     * or -l and -c hasn't, and we're not su'ing to root.
>     */
>    if ((asme || (!asthem && class == NULL)) && pwd->pw_uid)
>            setwhat &= ~(LOGIN_SETPRIORITY|LOGIN_SETRESOURCES);
> 
>    if (setusercontext(lc, pwd, pwd->pw_uid, setwhat) == -1)
>            err(EXIT_FAILURE, "setusercontext");
> 
> So using "su" (without -m for example), a user (who knows another user 
> account's password) can login to that other user's account and because 
> LOGIN_SETRESOURCES is not used their previous resources are in effect. Is 
> that okay?
> 
> This seems like a way a user can misuse resources. Comments?

If I understand things right, the way this would work is that user A would 
log into user B's account but the process limits & such would be counted 
against user A, correct? Or would they no longer be counted against user A 
and user B would be well-above limits?

Take care,

Bill
Jeremy C. Reed | 15 Jun 2006 02:55

Re: su and resources not honored

On Wed, 14 Jun 2006, Bill Studenmund wrote:

> If I understand things right, the way this would work is that user A would 
> log into user B's account but the process limits & such would be counted 
> against user A, correct? Or would they no longer be counted against user A 
> and user B would be well-above limits?

They would not be counted against user A. And user B would never get 
resource limits set (i.e. setrlimit), so could potentially be above 
limits.

It works correctly on NetBSD 2.1 (before pam):

rainier:~$ id -un
reed
rainier:~$ ulimit -u
200
rainier:~$ su dummy
Password:
rainier: {2} id -un
dummy
rainier: {1} limit maxproc
maxproc         5

It doesn't work with NetBSD 3.99.20:

$ id -un
reed
$ ulimit -p 
160
(Continue reading)

Bill Studenmund | 15 Jun 2006 03:15
Picon

Re: su and resources not honored

On Wed, Jun 14, 2006 at 05:55:50PM -0700, Jeremy C. Reed wrote:
> On Wed, 14 Jun 2006, Bill Studenmund wrote:
> 
> > If I understand things right, the way this would work is that user A would 
> > log into user B's account but the process limits & such would be counted 
> > against user A, correct? Or would they no longer be counted against user A 
> > and user B would be well-above limits?
> 
> They would not be counted against user A. And user B would never get 
> resource limits set (i.e. setrlimit), so could potentially be above 
> limits.
> 
> It works correctly on NetBSD 2.1 (before pam):

[snip]

> It doesn't work with NetBSD 3.99.20:

Then it's a bug. :-)

Take care,

Bill

Gmane