Received: by mail.netbsd.org (Postfix, from userid 605) id 490B984D63; Sat, 19 Aug 2017 04:44:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id C972C84CDD for ; Sat, 19 Aug 2017 04:44:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 7B8SGey3oiAa for ; Sat, 19 Aug 2017 04:44:56 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 1A92E84D2E for ; Sat, 19 Aug 2017 04:44:56 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 18BA8FAD0; Sat, 19 Aug 2017 04:44:56 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 19 Aug 2017 04:44:56 +0000 From: "Soren Jacobsen" Subject: CVS commit: [netbsd-6] src/sys/netsmb To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20170819044456.18BA8FAD0@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: "Soren Jacobsen" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: snj Date: Sat Aug 19 04:44:56 UTC 2017 Modified Files: src/sys/netsmb [netbsd-6]: smb_dev.c smb_subr.c smb_subr.h smb_usr.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1487): sys/netsmb/smb_dev.c: 1.50 sys/netsmb/smb_subr.c: 1.38 sys/netsmb/smb_subr.h: 1.22 sys/netsmb/smb_usr.c: 1.17-1.19 Reject allocations for too-small buffers from userland. From Ilja Van Sprundel. -- Plug another overflow: refuse bogus sa_len from user. -- Reject negative ioc_setupcnt. -- Reject negative offset/count for smb read/write. Not clear that this is actually a problem for the kernel -- might overwrite user's buffers or return garbage to user, but that's their own damn fault. But it's hard to imagine that negative offset/count ever makes sense, and I haven't ruled out a problem for the kernel. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.39.14.1 src/sys/netsmb/smb_dev.c cvs rdiff -u -r1.36 -r1.36.8.1 src/sys/netsmb/smb_subr.c cvs rdiff -u -r1.20 -r1.20.14.1 src/sys/netsmb/smb_subr.h cvs rdiff -u -r1.16 -r1.16.18.1 src/sys/netsmb/smb_usr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.