Received: by mail.netbsd.org (Postfix, from userid 605) id AB71B84DAF; Wed, 1 Jan 2020 09:17:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 2FF2E84DA2 for ; Wed, 1 Jan 2020 09:17:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id B49bAKud8YaD for ; Wed, 1 Jan 2020 09:17:45 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id C38C684CDA for ; Wed, 1 Jan 2020 09:17:45 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id BB284FA97; Wed, 1 Jan 2020 09:17:45 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Wed, 1 Jan 2020 09:17:45 +0000 From: "Maxime Villard" Subject: CVS commit: src/sys/compat/netbsd32 To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200101091745.BB284FA97@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Maxime Villard" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: maxv Date: Wed Jan 1 09:17:45 UTC 2020 Modified Files: src/sys/compat/netbsd32: netbsd32_compat_43.c Log Message: Fix sizeof mismatch in copyin. This leads to a user-triggerable stack overflow. On my test build at least, by luck, the compiler orders the variables in a way that the overflow hits only local structures which haven't yet been initialized and used, so the overflow is harmless. Very easily seeable with kASan - just invoke the syscall from a 32bit binary. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/compat/netbsd32/netbsd32_compat_43.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.