Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2009244rdb; Sun, 11 Feb 2024 07:20:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEjtGU6PwmNxjUQBf5LidKmXonczVqhuD4V2xus336YwKvBbcIJZ+E7G5PoBUMUI7sgOj8Kwio4q4KpV8YvI+3CszV3UowhQO0LBRExg== X-Google-Smtp-Source: AGHT+IFMOceJwPEP6g2CqzH2zRlltCJ2lgm8hPD8CpPjM4dg7P5j39iLGs2Raxsx937Kv3dFDJf1 X-Received: by 2002:a17:906:6818:b0:a3c:825b:649e with SMTP id k24-20020a170906681800b00a3c825b649emr1518420ejr.34.1707664824704; Sun, 11 Feb 2024 07:20:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707664824; cv=pass; d=google.com; s=arc-20160816; b=EUDc5j8r2+bu6hWTxCJ13ly/NkPCzJPH/jAezT8I4v1Tw9a/fVwr87Bhb2cDUMeDFn t3x2DsXlZWNnhh1s0HGcIzphrLa+YRUUVqDWvNPKVhkZb2bxHlhznoDcPi1SiVKYLTO9 ncvqCbL/OLbwv0o6KJD8OFmziUYtc98DO/G+r/nOLI9bsgVlMexGRJB1FSftJTvqus3+ Ttm7ELs16NQugdNeOBlCta46bC33f/mj7Mp+Fr6kEevIf+Gjgd4Yr+YI+6Yy7MXvcTcO Zm/J4TVlMMtXSJtTJ4btsePLrLRthPm257gXpNntSNAmnA/hb2cXAxAY3HdILNUF3Lj9 yXyA== 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=AR7yBZlt6/+55WWVtS/SQrdnWZk7rUL7B3Q7yqxKZSw=; fh=Mvj/WSl5sBjKKdh+x4ILQYWHi2D10uVGrx+uQhsdeGA=; b=hT8iFlwyNNWfraUWcoSss+1SOZNSGHm4O81el4xH41yGiikqUJ+rKBpfg6kfhTTYSm EmsFEAiNHrwJPFZxg6JO+7Y0ahD/wKlz7jPq4+00ZVitResFKPCExnQnT+YJrk6Crkp5 8khmXqd5gtJJFzj3C62A/sBVX+m11ZzPQ1odasj/3dlMEpCx8FLPV7eNd65W/+kz3bp8 mgQ6zv3ptDSH6XTaRfIR2AxmZbb6LdleUezCh+ND2yRcI6yl1aNdfVhCOwiv6C10I7P0 lzhu4PEYBtBbVmYCe5uqNI90uKPt/48+Qk+3DIhf8UpJ3tS63fSvBUrSNfMvDt+I4LXC +6Hw==; 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-60830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60830-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; AJvYcCVXbly+BVj1U5uNJjvZg8if1HeBf1WVzrGoYrfwvrWexaSwBxYdEnGICkeG6r4CqCfK2IbZpHpVw/a0+Yu/ELI4OeqE5N80hX/+xEdJtg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ds7-20020a170907724700b00a3bf3c190afsi2875503ejc.929.2024.02.11.07.20.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 07:20:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-60830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60830-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 302FD1F212F8 for ; Sun, 11 Feb 2024 15:20:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B22DA5B671; Sun, 11 Feb 2024 15:20:16 +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 755DD5B664 for ; Sun, 11 Feb 2024 15:20:09 +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=1707664816; cv=none; b=T7QINqEmjpXmmUfal0bcT09A9TZIm4LyydTETVSER4Wgknd6EoPvgln+wU/ORmAUobsVDXnAtW4ckift50JuqvWN+CS7KFv3D88sV6ysSc95ZzeEl7aIQVSFXLXVJ807yM2HeQjSscUS1q2ibCau1BKT5gsTpAF1Yw7H3XpCP9o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707664816; c=relaxed/simple; bh=pqT/Yn/f95Jc51h+SeB+Tfid/Y0ml0JoyOXa8k+c3jI=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=nNjlqnoTimzVja3y753tbiEcQxNx2ZXn6lek8ST+0ybihNjITB9BptoZxEDheTaTyxoWYOE2ncCFR4Yj2NwaSnV314KAfO5KH3MKqdAIfi/B/TYC2SlgyyabTQSvMxaw+XTtVvVvIVJ+F+X50DO8eBAp1hvBtz+Poyi2AgL/WmQ= 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: CC: Daniil Dulov , Marc Dionne , David Howells , , Subject: [PATCH] afs: Increase buffer size in afs_update_volume_status() Date: Sun, 11 Feb 2024 07:04:42 -0800 Message-ID: <20240211150442.3416-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-03.aladdin.ru (192.168.1.103) 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 f84194b791d3..9d0da38bbcf6 100644 --- a/fs/afs/volume.c +++ b/fs/afs/volume.c @@ -302,7 +302,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[19]; int ret, idsz; _enter(""); -- 2.25.1