Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp121174rdb; Thu, 1 Feb 2024 04:08:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2wWa8fIJcHgH3dboWnI9saACzU1YsE1rSpBHjyLTjyFplH53EQ8+DtnJLFa3RWslC5Z8H X-Received: by 2002:ae9:e716:0:b0:783:f823:a863 with SMTP id m22-20020ae9e716000000b00783f823a863mr2658396qka.10.1706789290840; Thu, 01 Feb 2024 04:08:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706789290; cv=pass; d=google.com; s=arc-20160816; b=FS0LaCuyNH3fknyJuK5yw9m3Jz6wh8mcWXlwPuJQ0JOxaSRLcEDS9JcSpOrzsTVft8 JgoDps0C4d+hLOoVysY1rHtooLONo7Gj9JP7y1KvwtHJ6NXH1jSCbIX+WiS24C/hKXIq LIltMyYGSWyl+MkNCx1ABRYvRP87QsHnGpBQ948kz/JCKoGw6lOJquGbYQ4QDK08cYpw m4bnhTH3emU8k4xg/tvGkHI7Y/Qy8k56c20mpjaPED6ppxeyXREaH0qAmr6vqzzpqSWM 5nwTi7LX7A3Beardomlhffi6PR7rV24dyqTB+wLWVmAfE8cZBHV6rUt6DxLG1ullWbix aH6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=APSj11hWTUVj8gka+M4iE1mXC3Qu2YNRPmpo7N2ZZz4=; fh=DLR01xPN0zqrFIAexzkCy6WDMfX9Xuw6Y7624+bXwWA=; b=UmWR7Lg2//kREW6ELO5AcT6vwqPTYftviJBg4483yY9GWiVeIcIpRoCMpcHvI1H9HO K4FtnOjv/5vf0i+Ky55PStxNdbaYx0l8athy+m1fLiomHJDIMgljqIjYlrRzxjJJjKbR JlSLarS+5cM/Vf9Q3q/jHzg+xb5giLnnG1gbxRvCNjhdeo0p5N3bg92tpF/nXLXqWcmT 3f+hdEuibkbF12MSmATfBhxSnzx1ubGotdA/Hm0u2RvgkHerX+91SPlCFZ+OXwKARUeV KaJN8AnbUxbsvFI44aJ3r/rdS8ugyTBOU6kXQWuKEencmJIn4SkuAsqNf4EJPCq24o1K Asww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=astralinux.ru); spf=pass (google.com: domain of linux-kernel+bounces-48078-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48078-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWdeYBFV880JjHevFnfEmuUv+x6JEwj1NqjMZ91xvfH0Puntu9svxr82Tw9ID+y190bm/ZCwVlAujJjh6Wx9cS3jcmN00QFpbocto3xOA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x17-20020a05620a0ed100b00781b6a72c38si13762648qkm.410.2024.02.01.04.08.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 04:08:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48078-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=astralinux.ru); spf=pass (google.com: domain of linux-kernel+bounces-48078-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48078-linux.lists.archive=gmail.com@vger.kernel.org" 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 950061C28374 for ; Thu, 1 Feb 2024 12:08:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66DA615D5D4; Thu, 1 Feb 2024 12:07:53 +0000 (UTC) Received: from new-mail.astralinux.ru (new-mail.astralinux.ru [51.250.53.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9778915D5AF for ; Thu, 1 Feb 2024 12:07:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=51.250.53.164 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789272; cv=none; b=Sg4K04amruNTLyuW/ZsPK66oVZFotcT+969MRRn8Wr6vu3EfFox2hi1f59yVs8SheOH/e61hAOsJ4RWkUESNpb8Is7tbbmIOl0hHXkJE0z1KAjDW9piAgzZFhWx34ytQdzeT5IgF5WckxVE/76JQfhc+lXjqW785a0yAFv2dygQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706789272; c=relaxed/simple; bh=Xb32RFnnxd0YWCMLvOL0X89QJ5gFB+ifVMyQBccQwes=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sv+hC9ZL4ZmRf8I+eCRWZLr7NcfH75B6W5eM7JFXbKXaMQjtiUsbaEV8vlgYwVHkT1N8BzxYbwsj/YCfDGloUT7S6SZ7dn9wg+IX+XJFZb2GMEouZ1xrLPH8XjVaDereBrl9kDoJjEi1V0G+fFNk2oCLHXvErLjEvWzbmpwRW0s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=astralinux.ru; spf=pass smtp.mailfrom=astralinux.ru; arc=none smtp.client-ip=51.250.53.164 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=astralinux.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=astralinux.ru Received: from [192.168.50.99] (unknown [62.217.188.159]) by new-mail.astralinux.ru (Postfix) with ESMTPA id 4TQcvq4z5pzsRjW; Thu, 1 Feb 2024 15:01:59 +0300 (MSK) Message-ID: Date: Thu, 1 Feb 2024 15:01:20 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: RuPost Desktop Subject: Re: [PATCH] qnx4: add upcasting to avoid overflow Content-Language: ru To: Anders Larsen Cc: linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20231123100627.20739-1-abelova@astralinux.ru> From: =?UTF-8?B?0JDQvdCw0YHRgtCw0YHQuNGPINCb0Y7QsdC40LzQvtCy0LA=?= In-Reply-To: <20231123100627.20739-1-abelova@astralinux.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-DrWeb-SpamScore: -100 X-DrWeb-SpamState: legit X-DrWeb-SpamDetail: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehuddgtddvucetufdoteggodetrfcurfhrohhfihhlvgemucfftfghgfeunecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttderjeenucfhrhhomheptehhrggtthgrtgippicupiipieipmhhouegruceorggsvghlohhvrgesrghsthhrrghlihhnuhigrdhruheqnecuggftrfgrthhtvghrnhepueegueduvddtffetieekgfeggfeitddvjeduieevfefhkeeggfdvvdeluedtveeinecuffhomhgrihhnpehlihhnuhigthgvshhtihhnghdrohhrghenucfkphepiedvrddvudejrddukeekrdduheelnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedrhedtrdellegnpdhinhgvthepiedvrddvudejrddukeekrdduheelmeehkedvuddpmhgrihhlfhhrohhmpegrsggvlhhovhgrsegrshhtrhgrlhhinhhugidrrhhupdhnsggprhgtphhtthhopeefpdhrtghpthhtoheprghlsegrlhgrrhhsvghnrdhnvghtpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhvtgdqphhrohhjvggttheslhhinhhugihtvghsthhinhhgrdhorhhg X-DrWeb-SpamVersion: Vade Retro 01.423.251#02 AS+AV+AP Profile: DRWEB; Bailout: 300 X-AntiVirus: Checked by Dr.Web [MailD: 11.1.19.2307031128, SE: 11.1.12.2210241838, Core engine: 7.00.61.08090, Virus records: 12290912, Updated: 2024-Feb-01 10:21:37 UTC] Just a friendly reminder. 23/11/23 13:06, Anastasia Belova пишет: > To avoid possible integer overflow in qnx4_statfs > cast literal to unsigned long. Otherwise multiplication > of two u32 may give a value that is outside of the range. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Anastasia Belova > --- > fs/qnx4/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c > index 6eb9bb369b57..4be8dba60567 100644 > --- a/fs/qnx4/inode.c > +++ b/fs/qnx4/inode.c > @@ -133,7 +133,7 @@ static int qnx4_statfs(struct dentry *dentry, struct kstatfs *buf) > > buf->f_type = sb->s_magic; > buf->f_bsize = sb->s_blocksize; > - buf->f_blocks = le32_to_cpu(qnx4_sb(sb)->BitMap->di_size) * 8; > + buf->f_blocks = le32_to_cpu(qnx4_sb(sb)->BitMap->di_size) * 8ul; > buf->f_bfree = qnx4_count_free_blocks(sb); > buf->f_bavail = buf->f_bfree; > buf->f_namelen = QNX4_NAME_MAX;