Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2329090rdb; Mon, 12 Feb 2024 00:34:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBdL5tWSLkzRdfg911S4cCzN2RXFCJqCSBTDKgLaxU7S2y7dp/Iv+ZYQiwpSbSVdNCeZFQ X-Received: by 2002:a05:6808:1141:b0:3bf:cf70:fc7d with SMTP id u1-20020a056808114100b003bfcf70fc7dmr7687570oiu.4.1707726856382; Mon, 12 Feb 2024 00:34:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707726856; cv=pass; d=google.com; s=arc-20160816; b=SxUX4yQNJiGXdjLnrAnoOzuHFmPGW05XBR0cMBZpza2v61MRK9GuD4gvSTnEGmyyM3 pPKgipv9alV8yPFk+KwrRVf6+J5WtU3J1jX53TRJPuQAvd5GQs7QqccvcYxOLM8Vlbng 24bMZOrLeXj+vBAzinQbzi0hhneAj8T9Xil3jIagkbo/O0g4A+TSeFQAnGgbQRTA3Yv1 zvNY+riNAxOp9epSmhMrKGeX2AjkQuv09VvfjEMmse44CplTin765M1CibXiSTmpcxum rF2zeDNPNgmZcVCl823Se3bRY2davQWvvDn8nVDmVOOATw8J727FrymKc9b83k9O83RD C3pg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=XCegJq6xKXjM5CeRe622d69Z9MiMsdpxzHiJq7nRdEk=; fh=GOxJjlPeBQmRlpLAZRAkg6bBaGDLAz7CSHYX8Vetuqo=; b=hy6ZDWmK1ck/tCz91pFz4+s0J/+7lBlwH5K/MYggAANGXdOcmmykXnu+aBQghOfxA3 s4kJpVduz/scIbhUq5wvC0RLWdwMm4hU5BSR6apuy/d61fkN2eKRUIjeH3xfhufH2Pzh 0t3RUbFIGU+wfXKwPBzw/HUOQ90SEjnCfbKz6/c6QLXl+FGiw7SlMyiDc40bGOHi/T8S 24kNgeaY78F+e9yy55TPVhaFBFrtpUWqLwYnFU1A28fg1fsH3SMxrzjoeZi8nNYIeA4N FXMbtRPTqZvdRSnwwpK1/CW2zAVR41MBVnS+rftYEa57zGofEX+xxIOy+u3Y+zzUvio9 7F/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-61204-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61204-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru X-Forwarded-Encrypted: i=2; AJvYcCVjIVB2LznhVsYdy6wA2vDZkGJrjRbY+MspIu2iGepFpvv0tn3/cAl/abEjrrb8SEmrdEEm3KFTeRIPEP6MPKlOspcQwRBln5z+VoPpiw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l14-20020a05622a050e00b0042c4290c239si8223160qtx.444.2024.02.12.00.34.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 00:34:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61204-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aladdin.ru dmarc=pass fromdomain=aladdin.ru); spf=pass (google.com: domain of linux-kernel+bounces-61204-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61204-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aladdin.ru 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 271861C215A1 for ; Mon, 12 Feb 2024 08:34:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D64DEEAE3; Mon, 12 Feb 2024 08:34:09 +0000 (UTC) Received: from mail-out.aladdin-rd.ru (mail-out.aladdin-rd.ru [91.199.251.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61B4B101C1 for ; Mon, 12 Feb 2024 08:34:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.199.251.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707726849; cv=none; b=t8AXb8DYIZY2BhEXXD5HckfyiVJTtOtIMwl9dYr/UyCrJ4G8o6wqr9WD5XVJNzvCt1Zs+h4gqTBfrly1g6Hd+8wAJF4eeDkUwl/q1bH/eQHa8VYvbxZTDUjTvCVYYvee62LiDEr/wue2mQwKruJg3vJ7tG+9hhIg1k5Q5ZJgFIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707726849; c=relaxed/simple; bh=Ppw/szsqkGDaYnrWnVR/G4gm/cVWMG7SAB9kfoPViIc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ULTeK0nOi+6GsNLQKR1KCRFsf8TIalyTF82KJlBj63B7JHG1T9TM3buXKm3MIo29oi05RxFLTedbhQbTiTgdIfgaqQ1zxA3UGUdYC8+iBRzxCFvIx8/mGKe88oo7Ocd7L+ODstZSyH0IE8V3r4ANL5e9n0cHCusru9VqrglitRI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru; spf=pass smtp.mailfrom=aladdin.ru; arc=none smtp.client-ip=91.199.251.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aladdin.ru From: Daniil Dulov To: Jeffrey E Altman CC: Daniil Dulov , , Marc Dionne , David Howells , , Subject: [PATCH v2] afs: Increase buffer size in afs_update_volume_status() Date: Mon, 12 Feb 2024 00:33:47 -0800 Message-ID: <20240212083347.10742-1-d.dulov@aladdin.ru> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EXCH-2016-02.aladdin.ru (192.168.1.102) To EXCH-2016-01.aladdin.ru (192.168.1.101) 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(""); -- 2.25.1