]> The Tcpdump Group git mirrors - tcpdump/commit
NFS: Add two length checks
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 8 May 2024 14:05:17 +0000 (16:05 +0200)
committerfxlb <[email protected]>
Wed, 8 May 2024 19:12:19 +0000 (19:12 +0000)
commit47edb26bde6473ff8732ba77c6f6138925e0c2b5
treee994d9ca5964eb56b0c8629b3583f020be9db4e0
parent067f7dd17dc39144c4b292a13ceea53610b4b5e0
NFS: Add two length checks

This change avoids adding a large number to the packet pointer and
overflow it.

It also avoids the differences between 32-bit and 64-bit printouts.

Example:
32-bit:
NFS request xid 1168185174 80 readdirplus fh / 1441792 bytes @ 1585267068834414592 [|nfs]
---
64-bit:
NFS request xid 1168185174 80 readdirplus [|nfs]

Add a test file.
Update a test output accordingly.
print-nfs.c
tests/TESTLIST
tests/nfs-attr-oobr.out
tests/nfs_large_credentials_length.out [new file with mode: 0644]
tests/nfs_large_credentials_length.pcap [new file with mode: 0644]