[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <272e2048-85ca-4429-b3dc-b2434318dca4@auristor.com>
Date: Mon, 12 Feb 2024 09:56:41 -0500
From: Jeffrey E Altman <jaltman@...istor.com>
To: Daniil Dulov <d.dulov@...ddin.ru>
Cc: linux-afs@...ts.infradead.org, Marc Dionne <marc.dionne@...istor.com>,
David Howells <dhowells@...hat.com>, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: Re: [PATCH v2] afs: Increase buffer size in
afs_update_volume_status()
On 2/12/2024 3:33 AM, Daniil Dulov wrote:
> The max length of volume->vid value is 20 characters.
> So increase idbuf[] size up to 20 to avoid overflow.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation")
> Signed-off-by: Daniil Dulov <d.dulov@...ddin.ru>
> ---
> fs/afs/volume.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/afs/volume.c b/fs/afs/volume.c
> index 020ecd45e476..d4a379bfd54e 100644
> --- a/fs/afs/volume.c
> +++ b/fs/afs/volume.c
> @@ -353,7 +353,7 @@ static int afs_update_volume_status(struct afs_volume *volume, struct key *key)
> {
> struct afs_server_list *new, *old, *discard;
> struct afs_vldb_entry *vldb;
> - char idbuf[16];
> + char idbuf[20];
> int ret, idsz;
>
> _enter("");
Reviewed-by: Jeffrey Altman <jaltman@...istor.com>
Powered by blists - more mailing lists