Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2955392imu; Mon, 19 Nov 2018 08:35:01 -0800 (PST) X-Google-Smtp-Source: AJdET5coAn/1dvHcl5qZ6iRaqoXFjBZOMNrAfDM/sKWKqwO1YXA7aqUAS2fFrt1Wrm3ve56vAKSj X-Received: by 2002:a62:113:: with SMTP id 19mr23259778pfb.176.1542645301257; Mon, 19 Nov 2018 08:35:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645301; cv=none; d=google.com; s=arc-20160816; b=BP2dqz96f5sFSc3qZcWYp8NgGsQrtrymjpuMYU7Aniazt677NHSQmZ6MahsbpZvYmT VOe9FO0fe+pN1WiQILCAn72vq14iqFeJMTEyUieUhkfKhyR+ekazggWisY8BRpsGoMeJ zAu6CxohGbzk8KcBt2uk9p9+2e0JewLlX2yMV2z9epUAek2AOkvmxQqhYimBSVhKjew5 X0dhyHtM7hTImjJ3M1okwc8dnxAXIRhmbuFDeN97mXPM9/zvMC72RGZlKyqWQyoMYUQm wOM9fDaF1WLkCnGT4tJTVSY8AIIj3XOvaCSSGqEopEOqGa+6y1j5v+gUvWoOVYZvsQ1e mUiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dCihpg5ybhVH0SrO1TgGlr3ev9vEexLLWhGlcMMymCE=; b=udDW4sAFrFPqwcApBlBhQuuxa28WOxyyfIWK+zYnskZpG+Ed4YhXBk6iXtZNSEYgnI fojzj6VF6RXzUnE/8ZGFFixyXNH+esH2+sjUcF7x1byldASzW+7wj0uY3mcQVSds/iUf K+M7D4I7ui1W9P1PdXWfEzLVQejIkKrg1rF6bYlze4WnVZE/TnQgoMPUs1xxHiXeOwAe yrCW8PvirCUYuDlOXh79NOS6U1nsotQlb/qN2CpTIVxNRlZDjYxcdDf5c1nP6y93VqXh eYG99y+ShEPfm65517lurNbyOy4sLm+ID85HyYv+Zo8rjTSTGvwsn5FEOFEwaZhTOxF9 MdLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nrqPPwd9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si24987101pfk.287.2018.11.19.08.34.42; Mon, 19 Nov 2018 08:35:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nrqPPwd9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730632AbeKTC4M (ORCPT + 99 others); Mon, 19 Nov 2018 21:56:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:54266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729979AbeKTC4L (ORCPT ); Mon, 19 Nov 2018 21:56:11 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2124C2086A; Mon, 19 Nov 2018 16:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645124; bh=SxKVI6Gv+7ecNYT2ESNwjkFA6oqqa7Nafv4E6lnt848=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nrqPPwd9zwAphtNxTUoyY2djpLnZ2olXIH3+/J3RNgVCmH9+Oq/77EQTb15FeSSWM 6v28//yLoMbPIHT8fC+ZAgMHmScvDyiGCCZ5346ncKJfDErKK0kbLT8tTWBRXnXl+u fxyZPh8cWVehqbotsL0tcflSHDU+taVzi9YcfERo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Young_X , Jens Axboe , Ben Hutchings Subject: [PATCH 4.19 045/205] cdrom: fix improper type cast, which can leat to information leak. Date: Mon, 19 Nov 2018 17:25:52 +0100 Message-Id: <20181119162625.475338949@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Young_X commit e4f3aa2e1e67bb48dfbaaf1cad59013d5a5bc276 upstream. There is another cast from unsigned long to int which causes a bounds check to fail with specially crafted input. The value is then used as an index in the slot array in cdrom_slot_status(). This issue is similar to CVE-2018-16658 and CVE-2018-10940. Signed-off-by: Young_X Signed-off-by: Jens Axboe Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- drivers/cdrom/cdrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -2445,7 +2445,7 @@ static int cdrom_ioctl_select_disc(struc return -ENOSYS; if (arg != CDSL_CURRENT && arg != CDSL_NONE) { - if ((int)arg >= cdi->capacity) + if (arg >= cdi->capacity) return -EINVAL; }