diff options
author | Jorge Mora <jmora1300@gmail.com> | 2024-01-25 07:45:28 -0700 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2024-03-01 09:12:07 -0500 |
commit | 2f73f37d66774587a0d5053e365736e10fc98c41 (patch) | |
tree | 0e99a3f1d882b773d6ea787cbc32813838fa2fd3 /crypto | |
parent | 61ab5e07587554d0edec318b6c99b7083967b2ec (diff) |
NFSD: fix LISTXATTRS returning a short list with eof=TRUE
If the XDR buffer is not large enough to fit all attributes
and the remaining bytes left in the XDR buffer (xdrleft) is
equal to the number of bytes for the current attribute, then
the loop will prematurely exit without setting eof to FALSE.
Also in this case, adding the eof flag to the buffer will
make the reply 4 bytes larger than lsxa_maxcount.
Need to check if there are enough bytes to fit not only the
next attribute name but also the eof as well.
Fixes: 23e50fe3a5e6 ("nfsd: implement the xattr functions and en/decode logic")
Signed-off-by: Jorge Mora <mora@netapp.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions