Roberto Sassu
f749cb60a0
nfs: Fix KMSAN warning in decode_getfattr_attrs()
commit dc270d7159
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: stable@vger.kernel.org # v3.5.x
Fixes: 88034c3d88
("NFSv4.1 mdsthreshold attribute xdr")
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-14 13:19:37 +01:00
..
2024-01-25 15:35:18 -08:00
2024-06-12 11:12:49 +02:00
2024-03-26 18:20:04 -04:00
2023-07-24 10:30:01 +02:00
2024-10-17 15:24:23 +02:00
2024-08-19 06:04:23 +02:00
2024-10-17 15:24:23 +02:00
2024-11-08 16:28:21 +01:00
2024-07-25 09:50:45 +02:00
2024-07-05 09:33:55 +02:00
2023-08-24 13:24:15 -04:00
2023-04-26 09:04:59 -04:00
2023-08-24 13:24:15 -04:00
2024-06-12 11:12:47 +02:00
2024-03-26 18:20:03 -04:00
2023-07-24 10:30:01 +02:00
2024-11-14 13:19:37 +01:00
2024-06-16 13:47:47 +02:00
2023-04-11 13:08:26 -04:00
2023-08-23 15:58:47 -04:00
2023-08-09 08:56:36 +02:00
2024-05-17 12:01:57 +02:00
2023-08-30 11:08:27 -04:00
2023-03-06 09:57:12 +01:00
2023-04-27 19:57:00 -07:00
2023-08-24 13:24:15 -04:00
2023-03-06 09:57:12 +01:00
2023-08-30 11:08:27 -04:00
2023-07-10 14:36:11 +02:00
2024-08-03 08:53:54 +02:00
2023-07-10 14:36:11 +02:00
2022-11-01 10:04:52 -07:00
2024-09-18 19:24:06 +02:00
2024-10-17 15:24:23 +02:00
2023-04-13 11:49:35 -07:00
2023-02-14 15:43:57 -05:00
2022-11-27 22:09:59 -05:00
2024-03-26 18:20:02 -04:00
2024-10-17 15:24:23 +02:00
2023-06-19 15:10:45 -04:00
2023-08-23 15:58:47 -04:00
2024-03-26 18:20:03 -04:00
2023-04-11 13:08:27 -04:00
2024-07-25 09:50:45 +02:00
2023-08-24 13:24:15 -04:00
2024-03-26 18:20:03 -04:00
2024-09-18 19:24:06 +02:00
2023-02-14 14:22:32 -05:00
2024-04-03 15:28:29 +02:00
2024-11-14 13:19:30 +01:00
2024-07-25 09:50:44 +02:00
2023-04-13 11:49:35 -07:00
2023-08-19 10:26:29 -04:00
2023-06-19 15:04:13 -04:00
2022-11-27 22:10:00 -05:00
2024-04-03 15:28:29 +02:00