From owner-freebsd-bugs@freebsd.org Mon Aug 19 23:06:24 2019 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B75C6D4708 for ; Mon, 19 Aug 2019 23:06:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46C8gN4SWkz4Y6F for ; Mon, 19 Aug 2019 23:06:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 974A6D4707; Mon, 19 Aug 2019 23:06:24 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97134D4706 for ; Mon, 19 Aug 2019 23:06:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46C8gN3VFjz4Y6D for ; Mon, 19 Aug 2019 23:06:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 559BB21E07 for ; Mon, 19 Aug 2019 23:06:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x7JN6OMp057999 for ; Mon, 19 Aug 2019 23:06:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x7JN6O3q057998 for bugs@FreeBSD.org; Mon, 19 Aug 2019 23:06:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 239977] Integer Overflow: ping(8) option "-G" and "-g", bypass the invalid sweepmax and sweepmin packet size check Date: Mon, 19 Aug 2019 23:06:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: neerajpal09@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2019 23:06:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239977 Bug ID: 239977 Summary: Integer Overflow: ping(8) option "-G" and "-g", bypass the invalid sweepmax and sweepmin packet size check Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: neerajpal09@gmail.com Integer Overflow is observed in ping(8) command line option "-G" and option "-g". * sbin/ping/ping.c:350 (-G) and sbin/ping/ping.c:364 (-g) ** "sweepmax =3D ltmp;" & "sweepmin =3D ltmp;" <=3D storing long value to i= nt variable providing option "-G" with value 4294967297 and "-g" with 4294967292, will bypass the check at sbin/ping/ping.c:339 and at sbin/ping/ping.c:354 and wi= ll try to send packet with illegal range like (-4 ... 1) data bytes [Steps to reproduce] * root@freebsd:/usr/src/sbin/ping # ping -G 5 -g -1 localhost=20 ping: invalid packet size: `-1' * root@freebsd:/usr/src/sbin/ping # ping -G 4294967297 -g 4294967292 localh= ost PING localhost (127.0.0.1): (-4 ... 1) data bytes 8 bytes from 127.0.0.1: icmp_seq=3D4 ttl=3D64 9 bytes from 127.0.0.1: icmp_seq=3D5 ttl=3D64 --- localhost ping statistics --- 6 packets transmitted, 2 packets received, 66.7% packet loss [Impact] Bypass the check for invalid packet size and will try to send packet with illegal sweepmax and sweepmin size properties. Note: root privilege is required. --=20 You are receiving this mail because: You are the assignee for the bug.=