Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2011 18:30:32 -0600
From:      Christian Peron <csjp@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Tom Judge <tom@tomjudge.com>, freebsd-security@freebsd.org, Bjoern Zeeb <bz@freebsd.org>, Lawrence Stewart <lstewart@freebsd.org>
Subject:   Re: Recent full disclosure post - Local DOS
Message-ID:  <20110129003032.GA16316@movsx>
In-Reply-To: <201101281427.19212.jhb@freebsd.org>
References:  <4D42D2B2.4030806@tomjudge.com> <201101281209.51046.john@baldwin.cx> <4D42FF0E.9030407@tomjudge.com> <201101281427.19212.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Fri, Jan 28, 2011 at 02:27:18PM -0500, John Baldwin wrote:
[..]
> ===================================================================
> --- tcp_usrreq.c	(revision 218018)
> +++ tcp_usrreq.c	(working copy)
> @@ -1330,7 +1330,8 @@ tcp_ctloutput(struct socket *so, struct sockopt *s
>  				tp->t_flags |= TF_NOPUSH;
>  			else {
>  				tp->t_flags &= ~TF_NOPUSH;
> -				error = tcp_output(tp);
> +				if (TCPS_HAVEESTABLISHED(tp->t_state))
> +					error = tcp_output(tp);
>  			}
>  			INP_WUNLOCK(inp);
>  			break;

I was thinking of correcting it the same way.. I might even do something
like:

	else {
		if (tp->t_flags & TF_NOPUSH) {
			tp->t_flags &= ~TF_NOPUSH;
			if (TCPS_HAVEESTABLISHED(tp->t_state))
				error = tcp_output(tp);
		}
	}

By default, this mask is not set.. so un-setting it and calling tcp_output() 
if it was not already set seems wasteful

-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAk1DX6gACgkQzHFpVAM/ozy8bQCeNtF3+gblw3B8qOCKMV64LhEO
sTcAn1WHorzA33/saFpWaoaEbmUoUenG
=bNbf
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110129003032.GA16316>