acrn-kernel/fs/afs
Daniil Dulov e8530b170e afs: Increase buffer size in afs_update_volume_status()
[ Upstream commit 6ea38e2aeb72349cad50e38899b0ba6fbcb2af3d ]

The max length of volume->vid value is 20 characters.
So increase idbuf[] size up to 24 to avoid overflow.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

[DH: Actually, it's 20 + NUL, so increase it to 24 and use snprintf()]

Fixes: d2ddc776a4 ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20240211150442.3416-1-d.dulov@aladdin.ru/ # v1
Link: https://lore.kernel.org/r/20240212083347.10742-1-d.dulov@aladdin.ru/ # v2
Link: https://lore.kernel.org/r/20240219143906.138346-3-dhowells@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:26:36 +01:00
..
Kconfig
Makefile
addr_list.c
afs.h
afs_cm.h
afs_fs.h
afs_vl.h
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: Fix overwriting of result of DNS query 2024-01-01 12:38:58 +00:00
cmservice.c
dir.c afs: Hide silly-rename files from userspace 2024-01-31 16:17:04 -08:00
dir_edit.c
dir_silly.c
dynroot.c afs: Fix dynamic root lookup DNS check 2024-01-01 12:38:57 +00:00
file.c
flock.c
fs_operation.c
fs_probe.c
fsclient.c
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 mm, netfs, fscache: stop read optimisation when folio removed from pagecache 2024-01-10 17:10:31 +01:00
main.c
misc.c
mntpt.c
proc.c
protocol_afs.h
protocol_uae.h
protocol_yfs.h
rotate.c
rxrpc.c afs: Fix refcount underflow from error handling race 2023-12-20 17:00:15 +01:00
security.c
server.c afs: fix the usage of read_seqbegin_or_lock() in afs_find_server*() 2024-02-05 20:12:48 +00:00
server_list.c afs: Fix afs_server_list to be cleaned up with RCU 2023-12-03 07:32:06 +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
vl_list.c
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
volume.c afs: Increase buffer size in afs_update_volume_status() 2024-03-01 13:26:36 +01:00
write.c afs: Fix accidental truncation when storing data 2023-07-19 16:22:06 +02:00
xattr.c
xdr_fs.h
yfsclient.c