linux/fs/afs
Zhen Ni 7b8381f3c4 afs: Fix potential null pointer dereference in afs_put_server
commit 9158c6bb24 upstream.

afs_put_server() accessed server->debug_id before the NULL check, which
could lead to a null pointer dereference. Move the debug_id assignment,
ensuring we never dereference a NULL server pointer.

Fixes: 2757a4dc18 ("afs: Fix access after dec in put functions")
Cc: stable@vger.kernel.org
Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
Acked-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-02 13:40:41 +02:00
..
addr_list.c afs: Use kfree_rcu() instead of casting kfree() to rcu_callback_t 2020-03-13 10:47:33 -07:00
afs.h afs: Fix the maximum cell name length 2025-01-17 13:34:40 +01:00
afs_cm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_vl.h afs: Fix the maximum cell name length 2025-01-17 13:34:40 +01:00
callback.c afs: fix the usage of read_seqbegin_or_lock() in afs_lookup_volume_rcu() 2024-02-05 20:12:48 +00:00
cell.c afs: Make it possible to find the volumes that are using a server 2025-03-07 16:56:43 +01:00
cmservice.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
dir.c afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY 2025-02-21 13:48:53 +01:00
dir_edit.c afs: Fix missing subdir edit when renamed between parent dirs 2024-11-08 16:26:43 +01:00
dir_silly.c netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context 2022-06-09 13:55:00 -07:00
dynroot.c afs: Fix dynamic root lookup DNS check 2024-01-01 12:38:57 +00:00
file.c afs: fix __afs_break_callback() / afs_drop_open_mmap() race 2024-08-29 17:30:34 +02:00
flock.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-01 11:44:13 +01:00
fs_operation.c netfs: Fix gcc-12 warning by embedding vfs inode in netfs_i_context 2022-06-09 13:55:00 -07:00
fs_probe.c afs: Fix lost servers_outstanding count 2022-12-31 13:33:08 +01:00
fsclient.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-01 11:44:13 +01:00
inode.c afs: Fix getattr to report server i_size on dirs, not local size 2023-05-11 23:03:38 +09:00
internal.h afs: Make it possible to find the volumes that are using a server 2025-03-07 16:56:43 +01:00
Kconfig afs: Convert afs to use the new fscache API 2022-01-07 13:44:47 +00:00
main.c afs: Convert afs to use the new fscache API 2022-01-07 13:44:47 +00:00
Makefile afs: Convert afs to use the new fscache API 2022-01-07 13:44:47 +00:00
misc.c afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked 2022-09-06 21:33:01 -04:00
mntpt.c afs: Don't cross .backup mountpoint from backup volume 2024-06-16 13:41:31 +02:00
proc.c afs: Use refcount_t rather than atomic_t 2022-08-02 18:10:11 +01:00
protocol_afs.h afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server 2021-09-13 09:14:21 +01:00
protocol_uae.h afs: Add support for the UAE error table 2019-06-28 18:37:53 +01:00
protocol_yfs.h afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server 2021-09-13 09:14:21 +01:00
rotate.c afs: Adjust ACK interpretation to try and cope with NAT 2022-05-22 21:03:02 +01:00
rxrpc.c afs: Fix refcount underflow from error handling race 2023-12-20 17:00:15 +01:00
security.c afs: Prefer struct_size over open coded arithmetic 2022-04-26 10:20:00 -05:00
server.c afs: Fix potential null pointer dereference in afs_put_server 2025-10-02 13:40:41 +02:00
server_list.c afs: Fix the server_list to unuse a displaced server rather than putting it 2025-03-07 16:56:43 +01:00
super.c afs: Fix file locking on R/O volumes to operate in local mode 2023-12-03 07:32:08 +01:00
vl_alias.c afs: Make it possible to find the volumes that are using a server 2025-03-07 16:56:43 +01:00
vl_list.c afs: Use refcount_t rather than atomic_t 2022-08-02 18:10:11 +01:00
vl_probe.c afs: Fix vlserver probe RTT handling 2023-06-21 16:01:02 +02:00
vl_rotate.c afs: Return ENOENT if no cell DNS record can be found 2023-12-03 07:32:08 +01:00
vlclient.c afs: Fix the maximum cell name length 2025-01-17 13:34:40 +01:00
volume.c afs: Make it possible to find the volumes that are using a server 2025-03-07 16:56:43 +01:00
write.c afs: Fix accidental truncation when storing data 2023-07-19 16:22:06 +02:00
xattr.c afs: Stop listxattr() from listing "afs.*" attributes 2021-03-15 17:09:54 +00:00
xdr_fs.h afs: Fix directory format encoding struct 2025-02-21 13:48:53 +01:00
yfsclient.c afs: Fix the fallback handling for the YFS.RemoveFile2 RPC call 2025-02-21 13:48:54 +01:00