From owner-freebsd-current@freebsd.org Thu May 19 00:56:50 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51415B41F4F for ; Thu, 19 May 2016 00:56:50 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4232517B7 for ; Thu, 19 May 2016 00:56:50 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id 4178FB41F4C; Thu, 19 May 2016 00:56:50 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4123AB41F4A for ; Thu, 19 May 2016 00:56:50 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (unknown [IPv6:2602:304:b010:ef20::f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gw.catspoiler.org", Issuer "gw.catspoiler.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 23B9A17B6; Thu, 19 May 2016 00:56:50 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.15.2/8.15.2) with ESMTP id u4J0ueYI080817; Wed, 18 May 2016 17:56:44 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201605190056.u4J0ueYI080817@gw.catspoiler.org> Date: Wed, 18 May 2016 17:56:40 -0700 (PDT) From: Don Lewis Subject: Re: r299512 breaks dhclient on some networks To: cem@FreeBSD.org cc: ian.freislich@capeaugusta.com, current@freebsd.org In-Reply-To: <201605190033.u4J0XHMe080781@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2016 00:56:50 -0000 On 18 May, To: cem@FreeBSD.org wrote: > On 18 May, Conrad Meyer wrote: >> Hey Ian, >> >> r299512 incorrectly encoded client identifiers because I misunderstood >> the intent of the sizeof()-scaled client_id. I reverted that change >> and replaced it with r300174, which I believe fixes the first overrun >> more correctly. >> >> (Coverity may still complain about CID 1305550, but I don't believe >> it's valid for 'hlen' to exceed sizeof(hw_addr.haddr).) > > It's not, but the MIN() doesn't hurt. Coverity may no longer complain > though because your change may think that hlen is only 16 at this point > since that is what the earlier change tests against. > > If it is checked in one place, it should probably be checked in both, or > you could just add an assert() to check it ... If you removed the tests in both places, Coverity would probably just assume that everything is just fine and dandy ...