From owner-freebsd-i386@freebsd.org Sat Dec 31 14:35:40 2016 Return-Path: Delivered-To: freebsd-i386@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 5F1A3C997A9; Sat, 31 Dec 2016 14:35:40 +0000 (UTC) (envelope-from jenkins-admin@FreeBSD.org) Received: from jenkins-9.freebsd.org (jenkins-9.freebsd.org [8.8.178.209]) by mx1.freebsd.org (Postfix) with ESMTP id 51DC3124D; Sat, 31 Dec 2016 14:35:40 +0000 (UTC) (envelope-from jenkins-admin@FreeBSD.org) Received: from jenkins-9.freebsd.org (localhost [127.0.0.1]) by jenkins-9.freebsd.org (Postfix) with ESMTP id 2EF17586; Sat, 31 Dec 2016 14:35:40 +0000 (UTC) Date: Sat, 31 Dec 2016 14:35:36 +0000 (GMT) From: jenkins-admin@FreeBSD.org To: jmcneill@FreeBSD.org, ngie@FreeBSD.org, avos@FreeBSD.org, bapt@FreeBSD.org, jenkins-admin@FreeBSD.org, freebsd-current@FreeBSD.org, freebsd-i386@FreeBSD.org Message-ID: <1179799006.1.1483194940328.JavaMail.jenkins@jenkins-9.freebsd.org> In-Reply-To: <315735125.160.1483184518491.JavaMail.jenkins@jenkins-9.freebsd.org> References: <315735125.160.1483184518491.JavaMail.jenkins@jenkins-9.freebsd.org> Subject: FreeBSD_HEAD_i386 - Build #4532 - Fixed MIME-Version: 1.0 X-Jenkins-Job: FreeBSD_HEAD_i386 X-Jenkins-Result: SUCCESS Precedence: bulk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.23 List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2016 14:35:40 -0000 FreeBSD_HEAD_i386 - Build #4532 - Fixed: Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/4532/ Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/4532/changes Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/4532/console Change summaries: 310972 by jmcneill: Fix a typo in the third address of the reg property for the usbphy node. MFC after: 1 week 310963 by bapt: Bump copyright year. Happy New Year 2017! 310961 by avos: sysctl(8): fix typename for uint32_t. MFC after: 5 days. 310960 by ngie: Similar to r310954, set .len to 0 on malloc failure and to `len` only on success MFC after: 1 week 310958 by ngie: Initialize ret to SNMPD_INPUT_OK at the top of snmp_input_start(..) to avoid returning an uninitialized value There are some really complicated, snakey if-statements combined with switch statements that could result in an invalid value being returned as `ret` MFC after: 1 week Reported by: Coverity CID: 1006551 310957 by ngie: Use strlcpy when copying `com` to pdu->community to avoid potential buffer overruns MFC after: 1 week Reported by: Coverity CID: 1006823, 1006824 310954 by ngie: Set value->v.octetstring.len to a correct value on malloc success/failure The previous code always set value->v.octetstring.len to len, regardless of the result from the malloc call. This misleads the caller on malloc failure. Set .len to len on success and 0 on failure. MFC after: 1 week Reported by: Coverity CID: 1007590 310952 by ngie: MIB-II: use strlcpy instead of strcpy when copying {descr,name} This is of course to avoid buffer overruns The remaining strcpy instance in the module needs to be audited for correctness MFC after: 1 week Reported by: Coverity CID: 1006827, 1006828 310950 by ngie: MIB-II: use strlcpy when copying interface names to .ifr_name .ifra_name is assumed to be NUL terminated; using strlcpy(3) ensures that it's indeed NUL terminated whereas strncpy does not. Tested and verified as follows with a combination of ifconfig, snmpget, and snmpset: % ifconfig create lo1 127.0.0.2/8 % SNMPARGS="-v 3 -n '' -u bsnmp -A bsnmptest -l authPriv -a sha -x des -X bsnmptest localhost" % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4 IF-MIB::ifAdminStatus.4 = INTEGER: up(1) % snmpset $SNMPARGS IF-MIB::ifAdminStatus.4 i 2 IF-MIB::ifAdminStatus.4 = INTEGER: down(2) % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4 IF-MIB::ifAdminStatus.4 = INTEGER: down(2) % snmpset $SNMPARGS IF-MIB::ifAdminStatus.4 i 1 IF-MIB::ifAdminStatus.4 = INTEGER: up(1) % snmpget $SNMPARGS IF-MIB::ifAdminStatus.4 IF-MIB::ifAdminStatus.4 = INTEGER: up(1) MFC after: 2 weeks Reported by: Coverity CID: 1009652-1009656, 1349850 310942 by ngie: Unbreak the build by passing the string to strdup, not its length MFC after: 1 week X-MFC with: r310931 Pointyhat to: ngie