Bug 227496 - [patch] /usr/bin/quota overflow and underflow for NFS quota values.
Summary: [patch] /usr/bin/quota overflow and underflow for NFS quota values.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
Keywords: patch
: 221697 (view as bug list)
Depends on:
Reported: 2018-04-13 14:20 UTC by Per Andersson
Modified: 2018-04-16 19:35 UTC (History)
2 users (show)

See Also:

suggested patch (1.74 KB, text/plain)
2018-04-13 14:20 UTC, Per Andersson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Per Andersson 2018-04-13 14:20:26 UTC
Created attachment 192491 [details]
suggested patch

Quota calculation for NFS quotas over 2Tbyte fails due to overflow.
It also fails if the remote rpc.rquotad sends rq_bsize less than  DEV_BSIZE, in this case underflow.

See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221697
Comment 1 commit-hook freebsd_committer 2018-04-16 19:33:38 UTC
A commit references this bug:

Author: cem
Date: Mon Apr 16 19:33:04 UTC 2018
New revision: 332632
URL: https://svnweb.freebsd.org/changeset/base/332632

  quota(1): Fix calculation overflow and underflow

  For very large quotas, do the multiplication as a 64 bit value to avoid

  For very small block sizes (smaller than DEV_BSIZE), multiple first
  before dividing by block size to avoid underflow.

  PR:		227496
  Submitted by:	Per Andersson <pa AT chalmers.se>
  Sponsored by:	Dell EMC Isilon

Comment 2 Conrad Meyer freebsd_committer 2018-04-16 19:35:29 UTC
*** Bug 221697 has been marked as a duplicate of this bug. ***