From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 23 19:10:01 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CA7F2AF for ; Tue, 23 Oct 2012 19:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id CC7518FC1B for ; Tue, 23 Oct 2012 19:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9NJA0Wv017219 for ; Tue, 23 Oct 2012 19:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9NJA0sE017218; Tue, 23 Oct 2012 19:10:00 GMT (envelope-from gnats) Resent-Date: Tue, 23 Oct 2012 19:10:00 GMT Resent-Message-Id: <201210231910.q9NJA0sE017218@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jens Wiatrowski Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FBCAC09 for ; Tue, 23 Oct 2012 19:02:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B7C158FC12 for ; Tue, 23 Oct 2012 19:02:02 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9NJ2297060866 for ; Tue, 23 Oct 2012 19:02:02 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q9NJ22rm060863; Tue, 23 Oct 2012 19:02:02 GMT (envelope-from nobody) Message-Id: <201210231902.q9NJ22rm060863@red.freebsd.org> Date: Tue, 23 Oct 2012 19:02:02 GMT From: Jens Wiatrowski To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/173002: data type size problem in if_spppsubr.c X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 19:10:01 -0000 >Number: 173002 >Category: kern >Synopsis: data type size problem in if_spppsubr.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 23 19:10:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Jens Wiatrowski >Release: FreeBSD-8.2 >Organization: >Environment: FreeBSD merlin 8.2-RELEASE FreeBSD 8.2-RELEASE #5: Tue Oct 23 18:37:46 MEST 2012 wiatro@merlin:/usr/src/freebsd-8.2-amd64/sys/amd64/compile/MERLIN amd64 >Description: Because cmd in struct spppreq (/usr/include/net/if_sppp.h) is an int, fuword32() should be used instead of fuword() in sys/net/if_spppsubr.c, line 5133, I think. >How-To-Repeat: Use /sbin/spppcontrol on a 64bit machine. >Fix: Apply the patch I've appended. Or change the type of cmd in struct spppreq to unsigned long. Patch attached with submission follows: *** sys/net/if_spppsubr.c.orig Tue Oct 23 18:47:42 2012 --- sys/net/if_spppsubr.c Tue Oct 23 18:46:27 2012 *************** *** 5130,5136 **** * Check the cmd word first before attempting to fetch all the * data. */ ! if ((subcmd = fuword(ifr->ifr_data)) == -1) { rv = EFAULT; goto quit; } --- 5130,5136 ---- * Check the cmd word first before attempting to fetch all the * data. */ ! if ((subcmd = fuword32(ifr->ifr_data)) == -1) { rv = EFAULT; goto quit; } >Release-Note: >Audit-Trail: >Unformatted: