Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1797407pxb; Sat, 4 Sep 2021 22:57:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrbNjVgReH2PzMnvIUyPsjlT98X/NiK6Lqxni4xvZJm+EnCgeMWeYbJ02Gehc7xQazcrQU X-Received: by 2002:a5d:8505:: with SMTP id q5mr5092153ion.53.1630821438919; Sat, 04 Sep 2021 22:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630821438; cv=none; d=google.com; s=arc-20160816; b=AvOPeoKgEgZ76V4QPfqWG9GlJ+aQJ6SPYXXUjYeELamqlpUktDCZLwPyP9DBVz7X4m 8b/SUcSf6/NRGDTJrmOccXg1Gu5+ZFjzkGQVdPDAo4AFxxfMGk903I0gjRzwn9v+NYFn /54Z8x0/LAeSigSXflPEYlQXeHmFodmVacOV0rHGcEz8Plp22s+yeG5SM+HQFwHKH4Y4 NxJ37CUNne1MN9T8QAZ4C2cw7b7+tl+4TQpwjL53WfrsLIlpPjbWs2QDe7yCX6jMAVH7 rSrxhSkbyeCOE8mvkV8ngEpXhI8VR86+Z2enQaa6Kcz7Tz/2qYtlfex2vs4TF4bfKRix /xww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=EOYB1KxFAVgDdS3yLIwc9PdjH+MHLY7d6qXq21McNz0=; b=xnO7/fqBp03DOrV4v4TUwhSHgO99BKxeVGWwS9mWdZXwvYkPymm14lYBK5ytsqCLni VjZbYJWbqFxvnvUpmPsXvoHkERqD8GgBmn6ZSI54UhvONvNOygKhA7rimS2ZVJn/Bzj1 EG/UPJolh1FgNrbUwbNbXCZH478VzKtXFfHLCIcgn65l+8tYWh/2evqMJIaJnIcQTbqy zMuIVQcwwa7WMsjOx74L7uGoSD0Xh4kjuLKrpPkJ801H4+aVJyTivQCQI3VNixrJmDMg gOko5JSFRphd9cr6zLk6atJ1GxtItKd9PozHJLOx4sfoX4hKFKU7dSXusGFIFCrg2+gb 49cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 4si3572758jaj.45.2021.09.04.22.56.52; Sat, 04 Sep 2021 22:57:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234083AbhIEEun (ORCPT + 99 others); Sun, 5 Sep 2021 00:50:43 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:36784 "EHLO mail-pg1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233722AbhIEEum (ORCPT ); Sun, 5 Sep 2021 00:50:42 -0400 Received: by mail-pg1-f181.google.com with SMTP id t1so3284735pgv.3; Sat, 04 Sep 2021 21:49:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=EOYB1KxFAVgDdS3yLIwc9PdjH+MHLY7d6qXq21McNz0=; b=Yaz8qkDMnk4XZl+D01zVcBqYsd1RIgQUj8F1+OpNVHd55r58FxkeFLvcKyHfaQcnqD 4YCn1GQPXB92D08n318lt2iBc1Tc3DLiRj0aWpp+pVo9NgWvEO/p2q5Z6bOjILbHMbYz Th7YrNs4Ot7zcmx0E5AkJZUuiUuQEl7azoXJrERdKz0RUHv7KVAlXpSmgZjF/xKLwmTP B7NnzOgqnYxUqb/4WFSUZXJeMK0cea4K/7gJmTPrZTaCbi6RkmCgl7Vfid3vXJuXjAcM BizOGCCzyI3+LfBuBgGNS7pEb6VXMYDPsGkDGAFEk1/kjbo4qQFOirHl0N49Z/SZlkSE nGcQ== X-Gm-Message-State: AOAM5331OQMudCpk1hLs2D1DyoPITvA4j/AaojjNZt6hQuxK9oOHRKCq bDzsEBn3rO/C82GWfHeUbE8= X-Received: by 2002:a62:b615:0:b0:3f9:1c5a:2671 with SMTP id j21-20020a62b615000000b003f91c5a2671mr6193712pff.10.1630817379902; Sat, 04 Sep 2021 21:49:39 -0700 (PDT) Received: from ?IPV6:2601:647:4000:d7:f591:655e:bc:ec9f? ([2601:647:4000:d7:f591:655e:bc:ec9f]) by smtp.gmail.com with UTF8SMTPSA id ml10sm3725742pjb.9.2021.09.04.21.49.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Sep 2021 21:49:38 -0700 (PDT) Message-ID: <388781f8-b9ce-abc2-148a-0498d32b6cb4@acm.org> Date: Sat, 4 Sep 2021 21:49:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.0.1 Subject: Re: [PATCH -next] [SCSI] Fix NULL pointer dereference in handling for passthrough commands Content-Language: en-US To: Laibin Qiu , jejb@linux.ibm.com, martin.petersen@oracle.com, hare@suse.de Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210904064534.1919476-1-qiulaibin@huawei.com> From: Bart Van Assche In-Reply-To: <20210904064534.1919476-1-qiulaibin@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/3/21 23:45, Laibin Qiu wrote: > In passthrough path. If the command size for ioctl request from userspace > is 0. The original process will get cmd_len from cmd->cmnd, but It has > not been assigned at this time. So it will trigger a NULL pointer BUG. A Friday night in the middle of the merge window is not the best time to post a kernel patch. Anyway: Reviewed-by: Bart Van Assche