Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751788AbdG0MwO (ORCPT ); Thu, 27 Jul 2017 08:52:14 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:42310 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbdG0MwL (ORCPT ); Thu, 27 Jul 2017 08:52:11 -0400 To: Johannes Thumshirn Cc: "Martin K . Petersen" , Jason L Tibbitts III , Doug Gilbert , Linux Kernel Mailinglist , Linux SCSI Mailinglist , Hannes Reinecke , stable@vger.kernel.org Subject: Re: [PATCH] scsi: sg: only check for dxfer_len greater than 256M From: "Martin K. Petersen" Organization: Oracle Corporation References: <20170727071126.4717-1-jthumshirn@suse.de> Date: Thu, 27 Jul 2017 08:51:56 -0400 In-Reply-To: <20170727071126.4717-1-jthumshirn@suse.de> (Johannes Thumshirn's message of "Thu, 27 Jul 2017 09:11:26 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 330 Lines: 12 Johannes, > Don't make any assumptions on the sg_io_hdr_t::dxfer_direction or the > sg_io_hdr_t::dxferp in order to determine if it is a valid > request. The only way we can check for bad requests is by checking if > the length exceeds 256M. Applied to 4.13/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering