From owner-svn-src-head@freebsd.org Thu Apr 4 03:22:46 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03D46155FA18; Thu, 4 Apr 2019 03:22:46 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9082E8215C; Thu, 4 Apr 2019 03:22:45 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt1-x843.google.com with SMTP id z17so1555468qts.13; Wed, 03 Apr 2019 20:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=L6rJS0MfA17JqTpIuvBDGSqfNZqk5HJ3TLt+FbNGB0c=; b=mcpOBTC2jiHONRIpGNMLdPG/EhQnPQPToSoLsgDoSfCWJjRU7Cc1g36EeFyE/yNypd Bws15Kzl3j+WQOzFBm2yzS97fPKxAUdNsyXUTl7sdp0zruzaYbOlWhTBsYUs+bEc7hzU 1x+9QgW6KfBGS5c/0qmvpY36fzE10AAE0vSmp92uQub4o5+jOAcNTlQzjhkIgkAEwke9 Eg11xMwOzSFCfh/cWzLpc+PRoXrFdCp36OzyP0XtQSJ9B70GmXW4B0Bc2RrD4JzZ6BjR JyDiTvfkYZc+qrRe+nTnvvwgdZWdw+atp7SfjnbtNcZIKSnFnGVrOoDP5YPk3DXTaiiC tVPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=L6rJS0MfA17JqTpIuvBDGSqfNZqk5HJ3TLt+FbNGB0c=; b=NnxKUrUAmTnflETK0Puqb90Q6guZwoIfg11cLsJeLW2VqOxlciwugkVjUIkbZKRYin 1YSRwpIXuyxHDfynimffW803HFhRGAzuduGEELnJRa1tmtZDCo2MPdevv913jTmj5ZDV jjFCDCJ+knF8e8b1F3p9Y0s95m4CKLM0DpI/gi2k1p3lIRXG4vkRdMly3hrZG2KW1Egi 7QlxqiAUiUuRhfwK/eUB8T+iLsFBcMbMznNYoZUBc+0mrRezh9qAh9yiIVIb3jG16PWO YH/69aMPb9lSyoOTFJzMs/d48B84ert4TOZSsLi0iNFYgSI4SK++dirgFc25NBixWH5k BTTQ== X-Gm-Message-State: APjAAAUqjfBbVCtAdOHy8EFAei3sV4N3ks0XybzPRXjkDczpxMIlChrp EZtjtDM6NuSDIo19s0KwC+QXkt8Vz8vdYFK+LuyDQg== X-Google-Smtp-Source: APXvYqyuNdIaS3+NWHrmtiUfUG2U20pNctcOnojkBKBVGUqIbhwom7vq3m0tvbP5WYOsxot5mxdKaBwjIJmjziU+Xzg= X-Received: by 2002:a0c:d483:: with SMTP id u3mr2786707qvh.54.1554348165252; Wed, 03 Apr 2019 20:22:45 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:3353:0:0:0:0:0 with HTTP; Wed, 3 Apr 2019 20:22:44 -0700 (PDT) In-Reply-To: References: <201904032037.x33KbEjq070604@repo.freebsd.org> From: Mateusz Guzik Date: Thu, 4 Apr 2019 05:22:44 +0200 Message-ID: Subject: Re: svn commit: r345853 - head/usr.bin/rctl To: Enji Cooper Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9082E8215C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2019 03:22:46 -0000 On 4/4/19, Enji Cooper wrote: > >> On Apr 3, 2019, at 1:37 PM, Mateusz Guzik wrote: >> >> Author: mjg >> Date: Wed Apr 3 20:37:14 2019 >> New Revision: 345853 >> URL: https://svnweb.freebsd.org/changeset/base/345853 >> >> Log: >> rctl: fix sysctl kern.racct.enable use after r341182 >> >> The value was changed from int to bool. Since the new type >> is smaller, the rest of the variable in the caller was left >> unitialized. > > I hit a bug like this recently with capsicum-test. Do you think it makes > sense to purge all of the memory or return -1/set EINVAL for reasons similar > to this for newp? > > [EINVAL] A non-null newp is given and its specified length > in > newlen is too large or too small. > There is most likely code which always passed oversized bufs. This change would break it. -- Mateusz Guzik