From owner-freebsd-security@freebsd.org Sun Jan 31 11:29:24 2021 Return-Path: Delivered-To: freebsd-security@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 D4C6D4F104C for ; Sun, 31 Jan 2021 11:29:24 +0000 (UTC) (envelope-from SRS0=Af1q=HC=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DT8436Vswz3D8S; Sun, 31 Jan 2021 11:29:23 +0000 (UTC) (envelope-from SRS0=Af1q=HC=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 2510128417; Sun, 31 Jan 2021 12:29:15 +0100 (CET) Received: from illbsd.quip.test (ip-94-113-69-69.net.upcbroadband.cz [94.113.69.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id CB91228416; Sun, 31 Jan 2021 12:29:13 +0100 (CET) Subject: Re: [FreeBSD-Announce] FreeBSD Security Advisory FreeBSD-SA-21:01.fsdisclosure To: freebsd-security@freebsd.org, FreeBSD Security Advisories References: <20210129022826.C82C91DB44@freefall.freebsd.org> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: Date: Sun, 31 Jan 2021 12:29:12 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210129022826.C82C91DB44@freefall.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DT8436Vswz3D8S X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of SRS0=Af1q=HC=quip.cz=000.fbsd@elsa.codelab.cz has no SPF policy when checking 94.124.105.4) smtp.mailfrom=SRS0=Af1q=HC=quip.cz=000.fbsd@elsa.codelab.cz X-Spamd-Result: default: False [-1.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[quip.cz]; RBL_DBL_DONT_QUERY_IPS(0.00)[94.124.105.4:from]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[94.124.105.4:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[000.fbsd@quip.cz,SRS0=Af1q=HC=quip.cz=000.fbsd@elsa.codelab.cz]; RECEIVED_SPAMHAUS_PBL(0.00)[94.113.69.69:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[000.fbsd@quip.cz,SRS0=Af1q=HC=quip.cz=000.fbsd@elsa.codelab.cz]; MAILMAN_DEST(0.00)[freebsd-security] X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2021 11:29:24 -0000 On 29/01/2021 03:28, FreeBSD Security Advisories wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > ============================================================================= > FreeBSD-SA-21:01.fsdisclosure Security Advisory > The FreeBSD Project > > Topic: Uninitialized kernel stack leaks in several file systems > > Category: core > Module: fs > Announced: 2021-01-29 > Credits: Syed Faraz Abrar > Affects: All supported versions of FreeBSD. > Corrected: 2021-01-06 14:58:41 UTC (stable/12, 12.2-STABLE) > 2021-01-29 01:20:59 UTC (releng/12.2, 12.2-RELEASE-p3) > 2021-01-29 01:06:09 UTC (releng/12.1, 12.1-RELEASE-p13) > 2021-01-18 19:16:24 UTC (stable/11, 11.4-STABLE) > 2021-01-29 00:20:09 UTC (releng/11.4, 11.4-RELEASE-p7) > CVE Name: CVE-2020-25578, CVE-2020-25579 > > For general information regarding FreeBSD Security Advisories, > including descriptions of the fields above, security branches, and the > following sections, please visit . > > I. Background > > The FreeBSD kernel exports file system directory entries to userspace > using the generic "dirent" structure. Individual file systems implement > VOP_READDIR to convert from the file system's internal directory entry > layout to the generic form. dirent structures can be fetched from > userspace using the getdirentries(2) system call. > > II. Problem Description > > Several file systems were not properly initializing the d_off field of > the dirent structures returned by VOP_READDIR. In particular, tmpfs(5), > smbfs(5), autofs(5) and mqueuefs(5) were failing to do so. As a result, > eight uninitialized kernel stack bytes may be leaked to userspace by > these file systems. This problem is not present in FreeBSD 11. There is a Corrected in: stable/11, 11.4-STABLE and releng/11.4, 11.4-RELEASE-p7, but later is a statement "This problem is not present in FreeBSD 11". What is true? Is it fixed in newer patchlevel of FreeBSD 11.4 or it was not present in 11.x at all? Kind regards Miroslav Lachman From owner-freebsd-security@freebsd.org Sun Jan 31 15:25:52 2021 Return-Path: Delivered-To: freebsd-security@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 B4FDA4F9B75 for ; Sun, 31 Jan 2021 15:25:52 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.netfence.it (mailserver.netfence.it [78.134.96.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailserver.netfence.it", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DTFJv4n9bz3jk5 for ; Sun, 31 Jan 2021 15:25:51 +0000 (UTC) (envelope-from ml@netfence.it) Received: from alamar.ventu (alamar.local.netfence.it [10.1.2.18]) (authenticated bits=0) by soth.netfence.it (8.16.1/8.16.1) with ESMTPSA id 10VFPh8m037916 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO) for ; Sun, 31 Jan 2021 16:25:43 +0100 (CET) (envelope-from ml@netfence.it) X-Authentication-Warning: soth.netfence.it: Host alamar.local.netfence.it [10.1.2.18] claimed to be alamar.ventu Subject: Re: [FreeBSD-Announce] FreeBSD Security Advisory FreeBSD-SA-21:01.fsdisclosure To: freebsd-security@freebsd.org References: <20210129022826.C82C91DB44@freefall.freebsd.org> From: Andrea Venturoli Message-ID: <15879d07-6563-f762-c93c-cf91c9516ce7@netfence.it> Date: Sun, 31 Jan 2021 16:25:43 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4DTFJv4n9bz3jk5 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=netfence.it; spf=pass (mx1.freebsd.org: domain of ml@netfence.it designates 78.134.96.152 as permitted sender) smtp.mailfrom=ml@netfence.it X-Spamd-Result: default: False [-3.77 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[78.134.96.152:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:78.134.96.152]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[78.134.96.152:from:127.0.2.255]; PREVIOUSLY_DELIVERED(0.00)[freebsd-security@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[netfence.it,none]; NEURAL_HAM_SHORT(-0.97)[-0.973]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:35612, ipnet:78.134.0.0/17, country:IT]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-security] X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2021 15:25:52 -0000 On 1/31/21 12:29 PM, Miroslav Lachman wrote: >> Several file systems were not properly initializing the d_off field of >> the dirent structures returned by VOP_READDIR.  In particular, tmpfs(5), >> smbfs(5), autofs(5) and mqueuefs(5) were failing to do so.  As a result, >> eight uninitialized kernel stack bytes may be leaked to userspace by >> these file systems.  This problem is not present in FreeBSD 11. > > There is a Corrected in: stable/11, 11.4-STABLE and releng/11.4, > 11.4-RELEASE-p7, but later is a statement "This problem is not present > in FreeBSD 11". > What is true? Is it fixed in newer patchlevel of FreeBSD 11.4 or it was > not present in 11.x at all? My understanding is that the problem described in that paragraph does not affect 11.x, but the next one does (and is "Corrected..."). I.e. 11.x is affected by: > Additionally, msdosfs(5) was failing to zero-fill a pair of padding > fields in the dirent structure, resulting in a leak of three > uninitialized bytes. Is that right? bye av. From owner-freebsd-security@freebsd.org Sun Jan 31 17:35:46 2021 Return-Path: Delivered-To: freebsd-security@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 116824FDED6 for ; Sun, 31 Jan 2021 17:35:46 +0000 (UTC) (envelope-from gordon@tetlows.org) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4DTJBn1Qc0z3sC8 for ; Sun, 31 Jan 2021 17:35:45 +0000 (UTC) (envelope-from gordon@tetlows.org) Received: by mail-pf1-x42a.google.com with SMTP id q20so10011270pfu.8 for ; Sun, 31 Jan 2021 09:35:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=tU7mzm/Jnzss1Vu5h67sc+Y20pyVb9uASE14XviCRQU=; b=Fn4B3wGVDrd8BvJsOBqiwmGsmdd8Wt6xpjQTY564pPmGpuEK5spW4FCS8depAyiVi2 0npaetSEhHe28Tr9V1w+47BynCrgmMuChe6RShjyhtx869KLGyrkvj7Y4lfe74O+fTgP 3DNM+zgzxYdqIf0K+22bgZuzzbWmrsnmxTSvqPfLdehhErSgWe9u577RxWgrLlx6l4WR cz4owmUo5k6ucJEZLDY2ewcxnybHFAjDg6dS4pVfSbWwUyBHUQKoMEmMcgk+kC1hSygc 7T6453dWWARmq6fQW08sHiZpExDAI9LiBCkHLUlsFx8ZWwPU0AC7gzF+/teg1gr85G8E Xahg== X-Gm-Message-State: AOAM532vfJ2S2ykDfFG+T9odyy9fja7wkMIGHk+XSFZa7m1jFWWvHVlY EeWor8DJxEc1b/3eKVK8nu06VDZYZDDrJME= X-Google-Smtp-Source: ABdhPJwumqCm2BtVaiVoQVEIcG0xbJa5S0I+xvMcg8gIuuAnUuaZYAQ7zyih2eKZlgwqsCA6kpDXlw== X-Received: by 2002:a65:6409:: with SMTP id a9mr13308390pgv.212.1612114543705; Sun, 31 Jan 2021 09:35:43 -0800 (PST) Received: from 2603-8001-5e40-d300-d13a-46c6-7601-6917.res6.spectrum.com (2603-8001-5e40-d300-d13a-46c6-7601-6917.res6.spectrum.com. [2603:8001:5e40:d300:d13a:46c6:7601:6917]) by smtp.gmail.com with ESMTPSA id gd11sm13487463pjb.16.2021.01.31.09.35.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Jan 2021 09:35:42 -0800 (PST) From: Gordon Tetlow Message-Id: <6260D94B-3CC6-48CB-AA5A-7438D1E39679@tetlows.org> Content-Type: multipart/signed; boundary="Apple-Mail=_6812AF18-FDEF-4873-84B1-591B10CB40AE"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: [FreeBSD-Announce] FreeBSD Security Advisory FreeBSD-SA-21:01.fsdisclosure Date: Sun, 31 Jan 2021 09:35:31 -0800 In-Reply-To: <15879d07-6563-f762-c93c-cf91c9516ce7@netfence.it> Cc: freebsd-security@freebsd.org To: Andrea Venturoli References: <20210129022826.C82C91DB44@freefall.freebsd.org> <15879d07-6563-f762-c93c-cf91c9516ce7@netfence.it> X-Mailer: Apple Mail (2.3654.40.0.2.32) X-Rspamd-Queue-Id: 4DTJBn1Qc0z3sC8 X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; HAS_ATTACHMENT(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[tetlows.org:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[tetlows.org,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::42a:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[tetlows.org:s=google]; FREEFALL_USER(0.00)[gordon]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-security@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::42a:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::42a:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-security] X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2021 17:35:46 -0000 --Apple-Mail=_6812AF18-FDEF-4873-84B1-591B10CB40AE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 31, 2021, at 7:25 AM, Andrea Venturoli wrote: >=20 > On 1/31/21 12:29 PM, Miroslav Lachman wrote: >=20 >>> Several file systems were not properly initializing the d_off field = of >>> the dirent structures returned by VOP_READDIR. In particular, = tmpfs(5), >>> smbfs(5), autofs(5) and mqueuefs(5) were failing to do so. As a = result, >>> eight uninitialized kernel stack bytes may be leaked to userspace by >>> these file systems. This problem is not present in FreeBSD 11. >> There is a Corrected in: stable/11, 11.4-STABLE and releng/11.4, = 11.4-RELEASE-p7, but later is a statement "This problem is not present = in FreeBSD 11". >> What is true? Is it fixed in newer patchlevel of FreeBSD 11.4 or it = was not present in 11.x at all? >=20 > My understanding is that the problem described in that paragraph does = not affect 11.x, but the next one does (and is "Corrected..."). >=20 > I.e. 11.x is affected by: >=20 >> Additionally, msdosfs(5) was failing to zero-fill a pair of padding >> fields in the dirent structure, resulting in a leak of three >> uninitialized bytes. >=20 >=20 > Is that right? This is correct. If you look at the patch cited for 11.x, it only has a = fix applied to msdosfs(5). Best regards, Gordon --Apple-Mail=_6812AF18-FDEF-4873-84B1-591B10CB40AE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEuyjUCzYO7pNq7RVv5fe8y6O93fgFAmAW6mMACgkQ5fe8y6O9 3fj9KwgAgaYtWdyqtjQSJsruj6TekcEqwS3nBOUcwrGB0dPOa4SnDgXoqBilx2Xc rl8iQ6dzasorsBreAyGiRkIEDXjGWqZmcqHYtsoUlRtWcGC6KdY6VIfM8xpJfrsA oHzOyaAgIsFsDfjCPFduPD5Y8zE5oYNth2C8bJv3mJ5+TtpzRMbEYGDY79juWhxz 8du0+9hA8y7skOfojRj6FVa03Ut1i7IdCPPs5pKvQHa45x5l+Fo/irnK8jIbV8LJ zGAqWLc4qgMQdPWFW1eM+1P0AGpCm8Qea79xNCKUubJfCPJmptZyU8rLFK+TDcan Qv6PkgJm8Kq3wLcBjlu2cTrDT/4jfw== =4yBm -----END PGP SIGNATURE----- --Apple-Mail=_6812AF18-FDEF-4873-84B1-591B10CB40AE--