Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2498598rdb; Mon, 12 Feb 2024 06:57:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWmnkej9hcepre4Nq/YlAWmxSJh/9UemxOqVZkI/ZosN+W2yP5XuTwJ4MV6IWUn7TERWKM7gGBwioTQjgClQCJ2CkDTWI8mpO+ehJDfKQ== X-Google-Smtp-Source: AGHT+IGYyc5Ajq69wD2uYA0K9BgsY9VWPl0CySZ4lKSpkRbBwe7iV5CYxOWkU7hQGhW5F7ZVgSrl X-Received: by 2002:a17:90b:1c05:b0:298:9858:f03f with SMTP id oc5-20020a17090b1c0500b002989858f03fmr472990pjb.32.1707749843013; Mon, 12 Feb 2024 06:57:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707749842; cv=pass; d=google.com; s=arc-20160816; b=MxhCinjMlqapE6pIC8dyl2ufrZqB6Q13jtioppCScxX1RZnyjNAFJjjAwmq08+UjrC BN16ftQp40krqvpCPzmgGdEd5WpzxUl+DmiCsAK3RcrfzoMDQKvQbRbDmMJ9LwPmyULp 2au8lIFnwWVfuDtnrsrAXNlnIjJBzfxfr8s0736sBzvc598xR9URdvDrcEZrVVFvQuaz vLLUT2xFdJs2qgr+mCO4yO7HZxGxt0C4echZdz61wcjC9qL3Dht9mw4WGlSQuAJL9BxA e33k2c1hw7lka+vFmg61IabroxmUil6YD4D9np4RkIDph9tNUzHrnuccxpYQ6jdIAAzc E0UA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=4qSXVVeU29hJQju/8dYCIyz+nhki1n3FmlSUSu8iLeo=; fh=C3Wl6r0+nRVYxwmGaJlQfkX7RRdpCajVPjAUMPqj8lk=; b=g0ZskNUt/gvvjYL850DU5k3y9FFLSdEPGoSKEARLgAVLcPzmA6IPdB+mEbvLL4FfnB zcnMZzyvPSbXcJEXOjsQOIV5vF/TfYpm15g2yPeDXN6/CB2AZmC9YRE7vxdNLOjUYZCh MaNDkBfmWEaYnrlqxz3ZL8gALdN7esUwDWLIzUF8sKLTQc6CnkEd9LPwGCyoX9Dr8nHR LcEO+Mn8byzEnazcmSgbqDKdr327HGatn58qqogQheWWvzU+557f9QAH5Ld5Vqn0CWUP EROyVZGQOxHr0jkwRf5wJKjr28t6THc15Cg2X81wqI0LXl7nlzhNXtKbq+zZyT3Ncwlh LGXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@auristor.com header.s=MDaemon header.b=onVHkagI; arc=pass (i=1 spf=pass spfdomain=auristor.com dkim=pass dkdomain=auristor.com); spf=pass (google.com: domain of linux-kernel+bounces-61851-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=auristor.com X-Forwarded-Encrypted: i=2; AJvYcCVWGcLTiOmACwVSb0MuKM3XIaNbKk1AdiabQ6vPFP2gdgfGtgAtAEWxZijBEJWTD8fVc43/ftSshLAAe79PQALm72Sef6HdD3b4BKciyw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v3-20020a17090abb8300b00295dcfa67b3si384008pjr.183.2024.02.12.06.57.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 06:57:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61851-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@auristor.com header.s=MDaemon header.b=onVHkagI; arc=pass (i=1 spf=pass spfdomain=auristor.com dkim=pass dkdomain=auristor.com); spf=pass (google.com: domain of linux-kernel+bounces-61851-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=auristor.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AABE0282B27 for ; Mon, 12 Feb 2024 14:57:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 954873C480; Mon, 12 Feb 2024 14:56:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=auristor.com header.i=jaltman@auristor.com header.b="onVHkagI" Received: from sequoia-grove.ad.secure-endpoints.com (sequoia-grove.ad.secure-endpoints.com [208.125.0.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A9B83B794 for ; Mon, 12 Feb 2024 14:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.125.0.235 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707749818; cv=none; b=AcFIjMja0MTi6E4DtWABTeKaHSZfLsiOyXtjZvquiTn97EDwiSG9LZIZQtW8q5zN3ycYFEJ+XHTdWEl0K3Y6qy687kT5vOzxi6KNhnM1cwDhVUY9lnFNvrWLqcmy+FIaUjr8Us5d92g+mW55A6typWHoiBje5SbqqKoNotJz4oI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707749818; c=relaxed/simple; bh=mIgH+62Czxn0zOGC90bP7jhU4ojrsunV2HH3ooIhVik=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cUUzNftqhiGRnK1VnurEYoj0QkrrJB7Gf25rALzL4WugoWsuj3WN2YNd1EW8TdX8zwP+OkkiH1OGBo6r6f/xhkIx3lclRrn+Px/b/xJwKn4Z/tVvgTIVXakgRAXzH81FbO/XFbWzfBi9FsrCibhARwmh6X3uFs6hcQNCqORymfs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=auristor.com; spf=pass smtp.mailfrom=auristor.com; dkim=pass (1024-bit key) header.d=auristor.com header.i=jaltman@auristor.com header.b=onVHkagI; arc=none smtp.client-ip=208.125.0.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=auristor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=auristor.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/relaxed; d=auristor.com; s=MDaemon; r=y; t=1707749815; x=1708354615; i=jaltman@auristor.com; q=dns/txt; h=Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:Organization:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=4qSXVVeU29hJQju/8dYCIyz+nhki1n3Fml SUSu8iLeo=; b=onVHkagIPXYrYJtKmeMlYHAtZAOv2THxJmUuOzaD0kDGqSv5kA MTtrKoKWfZ1bWAidHntTsuJj6/neJwqoG0GMnTwzkBDbbwDJYKAykU+ZKW8pW54h 0nUir8kwCdfqnJYxM0JnLx93NRk31E+cd8v0iDpTjU7l+OGG0YZO1+f/s= X-MDAV-Result: clean X-MDAV-Processed: sequoia-grove.ad.secure-endpoints.com, Mon, 12 Feb 2024 09:56:55 -0500 Received: from [IPV6:2603:7000:73c:bb00:ad13:1ab2:8f50:ac1d] by auristor.com (IPv6:2001:470:1f07:f77:28d9:68fb:855d:c2a5) (MDaemon PRO v23.5.2) with ESMTPSA id md5001003800600.msg; Mon, 12 Feb 2024 09:56:54 -0500 X-Spam-Processed: sequoia-grove.ad.secure-endpoints.com, Mon, 12 Feb 2024 09:56:54 -0500 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 2603:7000:73c:bb00:ad13:1ab2:8f50:ac1d X-MDHelo: [IPV6:2603:7000:73c:bb00:ad13:1ab2:8f50:ac1d] X-MDArrival-Date: Mon, 12 Feb 2024 09:56:54 -0500 X-MDOrigin-Country: US, NA X-Authenticated-Sender: jaltman@auristor.com X-Return-Path: prvs=177267bb54=jaltman@auristor.com X-Envelope-From: jaltman@auristor.com X-MDaemon-Deliver-To: linux-kernel@vger.kernel.org Message-ID: <272e2048-85ca-4429-b3dc-b2434318dca4@auristor.com> Date: Mon, 12 Feb 2024 09:56:41 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] afs: Increase buffer size in afs_update_volume_status() To: Daniil Dulov Cc: linux-afs@lists.infradead.org, Marc Dionne , David Howells , linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20240212083347.10742-1-d.dulov@aladdin.ru> Content-Language: en-US From: Jeffrey E Altman Organization: AuriStor, Inc. In-Reply-To: <20240212083347.10742-1-d.dulov@aladdin.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MDCFSigsAdded: auristor.com 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 > --- > 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