Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2823579lqo; Mon, 20 May 2024 19:43:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtb/rzhbRIqV4HXL5RkVCjSnTIS6w3eDrIuMo7QrYpLwDt0KM1xysZ99GEc5j02wAES6Zma7UBcqnFMOXdyQQM1Wwix7chOA37c+T2pw== X-Google-Smtp-Source: AGHT+IGJlZbQy1hBQ2AVOvLcO8b84AiO+oZW8+5js5/i8I2T1HIbRIemOWhGDZevgW0DmpVa1D4b X-Received: by 2002:a17:902:e892:b0:1f3:7df:f0a3 with SMTP id d9443c01a7336-1f307dff24dmr35208515ad.7.1716259400897; Mon, 20 May 2024 19:43:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716259400; cv=pass; d=google.com; s=arc-20160816; b=duoJ42A9aNYZBNcWPal8vwBbkMtsZPSURjmcNs0Kg9SKmDwoaID6deHv1prMPli8Q9 1NQ9s/YwwmRxVPiq+TV8Ms+vvZiHJd6DDpcr5qhhm7DcvmydxFzoyTvRSrERgX6HoHka m9k5bkI3XmSHwgBwdt2PaQfr7hy71Bl5cD8qW1e06mlwfl/ygYftk6UXGZ/HQ+xFOhKe VDHDO5ipFWjM15Ks+i6S4q7YthCGsrH60SpXiZ8HX9uB3g/BDbliUqUO4LUFN9/4/650 eySAqiRayqeapT6ylFJJ4cbHAIftNFxJ4XqWcnxOoh3NvVh+eB4Yx0L1G86h3B+/lTwL rCwA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Q1ANszq/KhRVZ0uqtnDVZiqdhsEBMdrbt1oqDmfmMKE=; fh=3fgp4w2ps/ln3rGpcS9jvTmSdNb2tMgFnJaQuJQDFV4=; b=J0Yzc3/A3vsh4FxdUWlSkn+d17eKI0i4CKlYd46kKI/K1Mu8jaCh6qD8BCqydG/aka y51X7dlDL4r8x2IXZ30hAEJ9c2Wey6r49mrHAxoJWqIsjh94jSiKTc2JqrukfX7ilB4F IsolAV6k3uCLIJkAA7FPvvBOYKp9N9k4G/7+ZCloer7krfcRSbEOyn1oB8ECHliucFr7 dzkU/tH9wdjgn4lxbcW1MoLOYDJJDFsPGqvDiH2y+Pfq6mdw9W0cXDrKa0GrP5JntosI uCLf7nFAZpTVaCnHZ2tI8ueYsqpKdGbuVjLbbwBiaOvEeWZfprGl7fvRyHv6lgXqnY13 65xA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=DCeeH3lQ; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-184385-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184385-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f2f87f4a45si38291705ad.30.2024.05.20.19.43.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 19:43:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184385-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=@oracle.com header.s=corp-2023-11-20 header.b=DCeeH3lQ; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel+bounces-184385-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184385-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oracle.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 871CF2813EF for ; Tue, 21 May 2024 02:43:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5F1E134B1; Tue, 21 May 2024 02:41:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="DCeeH3lQ" Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 54B8E12E71; Tue, 21 May 2024 02:41:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716259267; cv=none; b=P5hXFyts6VFTgWbjZPgChl6/eY/9y9f7rkc3gcSL+bD6jN2UNLgTuibQHRFqHrr+54oreAxuKaRHml3+nlaWT+NztffLTIH+6ZHOnpOzE0sQaQop6D9fulmsguO9qEclpJo5NoWMzhPT8Qg+VrBpHjMiLSt8+GhXhU0p+N1eutU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716259267; c=relaxed/simple; bh=IOasFjIiDzWB1gXgz0Z5A2JuGeYdYgB6kaV7r4ZKVfw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fBL9fQ8qZI9+LZ+9spBYbbSAEqMJEAYh8fbPgZJmzhPrwZJQID3RHE0Azk2HR+UaYHbG7Ed2YiiJgXhYwchBbZ3cvcXISXSNgw0QOe1vzQCNc84yIBixUtsUYzsGlmn37aG2DkxqPrOvZNnW62ox4JDt/ECDjnsiAcFHAPnRV5k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=DCeeH3lQ; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44KMxVOK001853; Tue, 21 May 2024 02:41:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2023-11-20; bh=Q1ANszq/KhRVZ0uqtnDVZiqdhsEBMdrbt1oqDmfmMKE=; b=DCeeH3lQDgN4QkAoVA7aQquo+Ke/pXvxkJJLaCFk1kfqkQkrTpeeAvtPRtAri3rmLhQx 0TlvVWLHACdmJuzpakpWFlE52yoYyYJW3OoC3UpEP3q1BsHgBua1a+HW1m4qxY1cUEK8 csF6U8XcY20UXFI+q+tMjwB5BlFQqwqn36Ng1p++ijLMK+yiJ0LYCz6taCnNSSwBtao6 OOLPAFQYPEJr8iJ5AP+xBmRruVn4T5+eR8tH2Tg7k83KzT5az2HpU6xFSDWbl8qVp9wz IhqucqzqKD/AVtoX8D+Ybkavrhyo7/SWumhhjez19fVYxUC+iheR/hxalAwHch6AnJQb Ug== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y6mvv40yk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 May 2024 02:41:01 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44L1TVC6002776; Tue, 21 May 2024 02:40:59 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3y6js72bg1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 May 2024 02:40:59 +0000 Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 44L2exck013516; Tue, 21 May 2024 02:40:59 GMT Received: from ca-mkp2.ca.oracle.com.com (mpeterse-ol9.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.251.135]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3y6js72bfn-1; Tue, 21 May 2024 02:40:59 +0000 From: "Martin K. Petersen" To: "James E.J. Bottomley" , Nathan Chancellor , Bill Wendling , Justin Stitt Cc: "Martin K . Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2] scsi: sr: fix unintentional arithmetic wraparound Date: Mon, 20 May 2024 22:40:14 -0400 Message-ID: <171625915912.2717551.9281506639932713567.b4-ty@oracle.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240508-b4-b4-sio-sr_select_speed-v2-1-00b68f724290@google.com> References: <20240508-b4-b4-sio-sr_select_speed-v2-1-00b68f724290@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-21_01,2024-05-17_03,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405210020 X-Proofpoint-ORIG-GUID: mM9dtlgOZ54M8MsG3vFYc6BkwmSNCfdS X-Proofpoint-GUID: mM9dtlgOZ54M8MsG3vFYc6BkwmSNCfdS On Wed, 08 May 2024 17:22:51 +0000, Justin Stitt wrote: > Running syzkaller with the newly reintroduced signed integer overflow > sanitizer produces this report: > > [ 65.194362] ------------[ cut here ]------------ > [ 65.197752] UBSAN: signed-integer-overflow in ../drivers/scsi/sr_ioctl.c:436:9 > [ 65.203607] -2147483648 * 177 cannot be represented in type 'int' > [ 65.207911] CPU: 2 PID: 10416 Comm: syz-executor.1 Not tainted 6.8.0-rc2-00035-gb3ef86b5a957 #1 > [ 65.213585] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 > [ 65.219923] Call Trace: > [ 65.221556] > [ 65.223029] dump_stack_lvl+0x93/0xd0 > [ 65.225573] handle_overflow+0x171/0x1b0 > [ 65.228219] sr_select_speed+0xeb/0xf0 > [ 65.230786] ? __pm_runtime_resume+0xe6/0x130 > [ 65.233606] sr_block_ioctl+0x15d/0x1d0 > ... > > [...] Applied to 6.10/scsi-queue, thanks! [1/1] scsi: sr: fix unintentional arithmetic wraparound https://git.kernel.org/mkp/scsi/c/9fad9d560af5 -- Martin K. Petersen Oracle Linux Engineering