[Bug 260375] NFS server truncates directory cookies to 32-bits

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 03 Jan 2022 03:26:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260375

--- Comment #6 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=8ec62f06143a54dcb917cba4f24cf7c7a614265a

commit 8ec62f06143a54dcb917cba4f24cf7c7a614265a
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2021-12-13 03:57:14 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2022-01-03 03:09:15 +0000

    nfs: don't truncate directory cookies to 32-bits in the NFS server

    In NFSv2, the directory cookie was 32-bits.  NFSv3 widened it to
    64-bits and SVN r22521 widened the corresponding argument in
    VOP_READDIR, but FreeBSD's NFS server continued to treat the cookies as
    32-bits, and 0-extended to fill the field on the wire.  Nobody ever
    noticed, because every in-tree file system generates cookies that fit
    comfortably within 32-bits.

    Also, have better type safety for txdr_hyper.  Turn it into an inline
    function that type-checks its arguments.  Prevents warnings about
    shift-count-overflow.

    PR:             260375
    Reviewed by:    rmacklem
    Differential Revision: https://reviews.freebsd.org/D33404

    (cherry picked from commit 32fbc5d824f51f97220bc5c61a23e0bf3ff2b470)

 sys/fs/nfs/xdr_subs.h           | 10 ++++++----
 sys/fs/nfsserver/nfs_nfsdport.c | 13 ++++++-------
 sys/fs/nfsserver/nfs_nfsdsubs.c |  6 +++---
 sys/nfs/xdr_subs.h              | 12 +++++++-----
 4 files changed, 22 insertions(+), 19 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.