From owner-freebsd-fs@FreeBSD.ORG Sat Mar 28 21:41:19 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67958A3 for ; Sat, 28 Mar 2015 21:41:19 +0000 (UTC) Received: from hergotha.csail.mit.edu (wollman-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:ccb::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24934D98 for ; Sat, 28 Mar 2015 21:41:18 +0000 (UTC) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.9/8.14.9) with ESMTP id t2SLfGgo044831 for ; Sat, 28 Mar 2015 17:41:16 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.9/8.14.4/Submit) id t2SLfGWl044828; Sat, 28 Mar 2015 17:41:16 -0400 (EDT) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21783.8188.747673.152040@hergotha.csail.mit.edu> Date: Sat, 28 Mar 2015 17:41:16 -0400 From: Garrett Wollman To: freebsd-fs@freebsd.org Subject: Serious overflow/signedness issue in NFS server X-Mailer: VM 7.17 under 21.4 (patch 22) "Instant Classic" XEmacs Lucid X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (hergotha.csail.mit.edu [127.0.0.1]); Sat, 28 Mar 2015 17:41:16 -0400 (EDT) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, HEADER_FROM_DIFFERENT_DOMAINS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on hergotha.csail.mit.edu X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 21:41:19 -0000 Yesterday I upgraded my production NFS servers to 10.1 from 9.3. Very quickly, my users ran into the kernel RPC's buffer space throttling mechanism. Besides having a stupidly low and arbitrary hard-coded limit, this code also has overflow bugs which which were exposed by the switch to clang as the system compiler. Please have a look at for what I think is going to be the fix, and if you have a FreeBSD phabricator account, please sign on as a reviewer. I'm sure there are other lingering overflow bugs in this code. -GAWollman