From owner-svn-src-all@freebsd.org Tue Oct 22 15:51:07 2019 Return-Path: Delivered-To: svn-src-all@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 81DE515DFDF; Tue, 22 Oct 2019 15:51:07 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46yHzZ1hfzz3wyp; Tue, 22 Oct 2019 15:51:05 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f193.google.com with SMTP id 83so14637538oii.1; Tue, 22 Oct 2019 08:51:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1lAivZ/PejKRaDklOO3ee6kcG8Bv1t1oGUsOe7JVTHo=; b=WRyHtOpva9ygtHv7SyRoYDN5xtmEneB2Xe5aGjNJRt9ncZUONlFVpowiD5msiiLLhh SY12vv6pVVyXRNsOqxaXsj0cmE3tbdv2oAlV2nivSgF/UcHs7Y8r6ILlxHIYP9bm4Y/G jBHPVJU23gfA4sHC/U/QyhRqY3uTIFLnEM91cp5zP5QS2R/yJpoMBRj2r6ZRyz2a902Y MjnGCo6R0QJthkHF+OAF7BpI/ETPR72jdUSMd55XsLsMu/MyVWOXnHNzBSonmxzui0Rq hiNw2ov6KVqwQaZxcSMtBpTO6ylAamkqiCJR1SLgLOjwNDfIE95aOI7AIKeLZQwp1VFM yq1Q== X-Gm-Message-State: APjAAAVPUjdXuR9AnT3jSuqM4849g4c3wmqtYJi3YZrTOHtEmMmYu1xL mthKU55n9SECsTAcr7Vurp1j4KTV0BR/VdkIaxlJfntE X-Google-Smtp-Source: APXvYqwXMu0i06dhEEm3fzhrks5rMElr6c41XXU1q6KQtXj3YX5eTNVBNjrCozfmhKUt5tVNpCE6LZp4OHEH3v/phaE= X-Received: by 2002:a54:480d:: with SMTP id j13mr457227oij.55.1571759464580; Tue, 22 Oct 2019 08:51:04 -0700 (PDT) MIME-Version: 1.0 References: <201910161321.x9GDL2ee021543@repo.freebsd.org> In-Reply-To: <201910161321.x9GDL2ee021543@repo.freebsd.org> From: Alan Somers Date: Tue, 22 Oct 2019 09:50:53 -0600 Message-ID: Subject: Re: svn commit: r353640 - head/sys/kern To: Andrew Turner Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 46yHzZ1hfzz3wyp X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.193 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.06 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; URI_COUNT_ODD(1.00)[3]; IP_SCORE(-1.07)[ipnet: 209.85.128.0/17(-3.23), asn: 15169(-2.07), country: US(-0.05)]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[193.167.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[193.167.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Oct 2019 15:51:07 -0000 On Wed, Oct 16, 2019 at 7:21 AM Andrew Turner wrote: > Author: andrew > Date: Wed Oct 16 13:21:01 2019 > New Revision: 353640 > URL: https://svnweb.freebsd.org/changeset/base/353640 > > Log: > Stop leaking information from the kernel through timespec > > The timespec struct holds a seconds value in a time_t and a nanoseconds > value in a long. On most architectures these are the same size, however > on 32-bit architectures other than i386 time_t is 8 bytes and long is > 4 bytes. > > Most ABIs will then pad a struct holding an 8 byte and 4 byte value to > 16 bytes with 4 bytes of padding. When copying one of these structs the > compiler is free to copy the padding if it wishes. > > In this case the padding may contain kernel data that is then leaked to > userspace. Fix this by copying the timespec elements rather than the > entire struct. > > This doesn't affect Tier-1 architectures so no SA is expected. > > admbugs: 651 > MFC after: 1 week > Sponsored by: DARPA, AFRL > Good catch. Might I ask how you found it, or who reported it?