NetBSD Problem Report #52682
From www@NetBSD.org Tue Oct 31 11:48:27 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 334E37A1B9
for <gnats-bugs@gnats.NetBSD.org>; Tue, 31 Oct 2017 11:48:27 +0000 (UTC)
Message-Id: <20171031114826.53A9C7A210@mollari.NetBSD.org>
Date: Tue, 31 Oct 2017 11:48:26 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/dist/pf/net/pf.c:1711]: (warning) Redundant assignment
X-Send-Pr-Version: www-1.0
>Number: 52682
>Category: kern
>Synopsis: src/sys/dist/pf/net/pf.c:1711]: (warning) Redundant assignment
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 31 11:50:00 +0000 2017
>Closed-Date: Mon Nov 06 10:52:41 +0000 2017
>Last-Modified: Sat Feb 10 04:15:01 +0000 2018
>Originator: David Binderman
>Release: cvs-20171031
>Organization:
>Environment:
>Description:
src/sys/dist/pf/net/pf.c:1711]: (warning) Redundant assignment of 'm->m_pkthdr.pf.rtableid' to itself.
Source code is
if (r != NULL && r->rtableid >= 0)
m->m_pkthdr.pf.rtableid = m->m_pkthdr.pf.rtableid;
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/52682: src/sys/dist/pf/net/pf.c:1711]: (warning) Redundant assignment
Date: Tue, 31 Oct 2017 20:31:33 +0700
Date: Tue, 31 Oct 2017 11:50:00 +0000 (UTC)
From: dcb314@hotmail.com
Message-ID: <20171031115000.6DE107A219@mollari.NetBSD.org>
| src/sys/dist/pf/net/pf.c:1711]: (warning) Redundant assignment of 'm->m_pkthdr.pf.rtableid' to itself.
|
| Source code is
|
| if (r != NULL && r->rtableid >= 0)
| m->m_pkthdr.pf.rtableid = m->m_pkthdr.pf.rtableid;
This one is in code that is not compiled on NetBSD, so it really doesn't
matter.
It is not clear what it should be on whatever other system uses that section
of code (OpenBSD ?)
kre
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52682 CVS commit: src/sys/dist/pf/net
Date: Tue, 31 Oct 2017 11:00:03 -0400
Module Name: src
Committed By: christos
Date: Tue Oct 31 15:00:03 UTC 2017
Modified Files:
src/sys/dist/pf/net: pf.c
Log Message:
PR/52682: David Binderman: Fix wrong assignment (in the !__NetBSD__ code)
To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dist/pf/net/pf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Mon, 06 Nov 2017 10:52:41 +0000
State-Changed-Why:
christos fixed it (not that it mattered for netbsd)
From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52682 CVS commit: [netbsd-8] src/sys/dist/pf/net
Date: Sat, 10 Feb 2018 04:12:17 +0000
Module Name: src
Committed By: snj
Date: Sat Feb 10 04:12:17 UTC 2018
Modified Files:
src/sys/dist/pf/net [netbsd-8]: pf.c
Log Message:
Pull up following revision(s) (requested by maxv in ticket #540):
sys/dist/pf/net/pf.c: 1.77-1.78
PR/52682: David Binderman: Fix wrong assignment (in the !__NetBSD__ code)
Oh, what is this. Fix a remotely-triggerable integer overflow: the way we
define TCPOLEN_SACK makes it unsigned, and the comparison in the while()
is unsigned too. That's not the expected behavior, the original code
wanted a signed comparison.
It's pretty easy to make 'hlen' go negative and trigger a buffer overflow.
This bug was reported 8 years ago by Lucio Albornoz in PR/44059.
To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.76.6.1 src/sys/dist/pf/net/pf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.