Roberto Sassu
bbfcd261cc
nfs: Fix KMSAN warning in decode_getfattr_attrs()
commit dc270d7159699ad6d11decadfce9633f0f71c1db upstream.
Fix the following KMSAN warning:
CPU: 1 UID: 0 PID: 7651 Comm: cp Tainted: G B
Tainted: [B]=BAD_PAGE
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009)
=====================================================
=====================================================
BUG: KMSAN: uninit-value in decode_getfattr_attrs+0x2d6d/0x2f90
decode_getfattr_attrs+0x2d6d/0x2f90
decode_getfattr_generic+0x806/0xb00
nfs4_xdr_dec_getattr+0x1de/0x240
rpcauth_unwrap_resp_decode+0xab/0x100
rpcauth_unwrap_resp+0x95/0xc0
call_decode+0x4ff/0xb50
__rpc_execute+0x57b/0x19d0
rpc_execute+0x368/0x5e0
rpc_run_task+0xcfe/0xee0
nfs4_proc_getattr+0x5b5/0x990
__nfs_revalidate_inode+0x477/0xd00
nfs_access_get_cached+0x1021/0x1cc0
nfs_do_access+0x9f/0xae0
nfs_permission+0x1e4/0x8c0
inode_permission+0x356/0x6c0
link_path_walk+0x958/0x1330
path_lookupat+0xce/0x6b0
filename_lookup+0x23e/0x770
vfs_statx+0xe7/0x970
vfs_fstatat+0x1f2/0x2c0
__se_sys_newfstatat+0x67/0x880
__x64_sys_newfstatat+0xbd/0x120
x64_sys_call+0x1826/0x3cf0
do_syscall_64+0xd0/0x1b0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The KMSAN warning is triggered in decode_getfattr_attrs(), when calling
decode_attr_mdsthreshold(). It appears that fattr->mdsthreshold is not
initialized.
Fix the issue by initializing fattr->mdsthreshold to NULL in
nfs_fattr_init().
Cc: [email protected] # v3.5.x
Fixes: 88034c3d88 ("NFSv4.1 mdsthreshold attribute xdr")
Signed-off-by: Roberto Sassu <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
2024-11-17 14:58:51 +01:00 |
| .. |
|
blocklayout
|
blocklayoutdriver: Fix reference leak of pnfs_device_node
|
2024-01-25 14:34:24 -08:00 |
|
filelayout
|
pNFS/filelayout: Fix coalescing test for single DS
|
2023-01-24 07:17:58 +01:00 |
|
flexfilelayout
|
NFS/pNFS: Report EINVAL errors from connect() to the server
|
2023-10-10 21:46:35 +02:00 |
|
cache_lib.c
|
|
|
|
cache_lib.h
|
|
|
|
callback.c
|
|
|
|
callback.h
|
NFSv4.1: Fix uninitialised variable in devicenotify
|
2022-02-16 12:52:48 +01:00 |
|
callback_proc.c
|
NFSv4/pNFS: Fix another issue with a list iterator pointing to the head
|
2022-04-15 14:18:21 +02:00 |
|
callback_xdr.c
|
SUNRPC: Fix integer overflow in decode_rc_list()
|
2024-11-08 16:20:45 +01:00 |
|
client.c
|
nfs: make the rpc_stat per net namespace
|
2024-05-17 11:43:48 +02:00 |
|
delegation.c
|
|
|
|
delegation.h
|
|
|
|
dir.c
|
NFS: LOOKUP_DIRECTORY is also ok with symlinks
|
2022-02-23 11:59:59 +01:00 |
|
direct.c
|
NFS: swap-out must always use STABLE writes.
|
2022-04-15 14:18:36 +02:00 |
|
dns_resolve.c
|
|
|
|
dns_resolve.h
|
|
|
|
export.c
|
|
|
|
file.c
|
NFS: Do not report flush errors in nfs_write_end()
|
2022-06-14 18:11:43 +02:00 |
|
fscache-index.c
|
|
|
|
fscache.c
|
|
|
|
fscache.h
|
|
|
|
getroot.c
|
|
|
|
inode.c
|
nfs: Fix KMSAN warning in decode_getfattr_attrs()
|
2024-11-17 14:58:51 +01:00 |
|
internal.h
|
nfs: fix undefined behavior in nfs_block_bits()
|
2024-06-16 13:28:52 +02:00 |
|
io.c
|
|
|
|
iostat.h
|
|
|
|
Kconfig
|
|
|
|
Makefile
|
|
|
|
mount_clnt.c
|
|
|
|
namespace.c
|
|
|
|
netns.h
|
nfs: make the rpc_stat per net namespace
|
2024-05-17 11:43:48 +02:00 |
|
nfs.h
|
|
|
|
nfs2super.c
|
|
|
|
nfs2xdr.c
|
NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN
|
2023-09-23 10:59:48 +02:00 |
|
nfs3_fs.h
|
|
|
|
nfs3acl.c
|
|
|
|
nfs3client.c
|
|
|
|
nfs3proc.c
|
|
|
|
nfs3super.c
|
|
|
|
nfs3xdr.c
|
NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN
|
2023-09-23 10:59:48 +02:00 |
|
nfs4_fs.h
|
NFSv4 expose nfs_parse_server_name function
|
2022-02-16 12:52:48 +01:00 |
|
nfs4client.c
|
nfs4: Fix kmemleak when allocate slot failed
|
2022-11-10 17:57:49 +01:00 |
|
nfs4file.c
|
|
|
|
nfs4getroot.c
|
|
|
|
nfs4idmap.c
|
NFSv4: Fix races in the legacy idmapper upcall
|
2022-08-25 11:18:22 +02:00 |
|
nfs4idmap.h
|
|
|
|
nfs4namespace.c
|
NFSv4 expose nfs_parse_server_name function
|
2022-02-16 12:52:48 +01:00 |
|
nfs4proc.c
|
NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT
|
2024-01-25 14:34:24 -08:00 |
|
nfs4renewd.c
|
|
|
|
nfs4session.c
|
|
|
|
nfs4session.h
|
|
|
|
nfs4state.c
|
nfs: fix memory leak in error path of nfs4_do_reclaim
|
2024-11-08 16:20:34 +01:00 |
|
nfs4super.c
|
|
|
|
nfs4sysctl.c
|
|
|
|
nfs4trace.c
|
|
|
|
nfs4trace.h
|
NFS4: Trace state recovery operation
|
2023-10-10 21:46:44 +02:00 |
|
nfs4xdr.c
|
NFSv4.2: Fix a memory stomp in decode_attr_security_label
|
2023-01-18 11:41:07 +01:00 |
|
nfs42.h
|
|
|
|
nfs42proc.c
|
NFSv42: Fix pagecache invalidation after COPY/CLONE
|
2021-12-08 09:01:08 +01:00 |
|
nfs42xdr.c
|
NFSv42: Don't fail clone() unless the OP_CLONE operation failed
|
2021-12-01 09:23:32 +01:00 |
|
nfsroot.c
|
NFS: Fix an off by one in root_nfs_cat()
|
2024-03-26 18:22:24 -04:00 |
|
nfstrace.c
|
|
|
|
nfstrace.h
|
|
|
|
pagelist.c
|
|
|
|
pnfs.c
|
NFS: avoid infinite loop in pnfs_update_layout.
|
2024-09-04 13:14:57 +02:00 |
|
pnfs.h
|
NFSv4/pNFS: Fix another issue with a list iterator pointing to the head
|
2022-04-15 14:18:21 +02:00 |
|
pnfs_dev.c
|
NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info
|
2023-09-23 10:59:57 +02:00 |
|
pnfs_nfs.c
|
|
|
|
proc.c
|
|
|
|
read.c
|
nfs: Leave pages in the pagecache if readpage failed
|
2024-07-05 09:08:32 +02:00 |
|
super.c
|
NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations
|
2024-09-12 11:03:55 +02:00 |
|
symlink.c
|
|
|
|
sysctl.c
|
|
|
|
sysfs.c
|
|
|
|
sysfs.h
|
|
|
|
unlink.c
|
|
|
|
write.c
|
NFS: Don't report errors from nfs_pageio_complete() more than once
|
2022-06-14 18:11:43 +02:00 |