Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp597344lqs; Tue, 5 Mar 2024 10:30:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWRZzsirVT0flSP7R3p3ed1ugAMhovg4q5OvRka/i4YWcokM0E7Q1zOMlwgX22UXe4+Rls4ML+U5lr2VSqcEQ1tXs33DWsJs2bhdErVIg== X-Google-Smtp-Source: AGHT+IET9kwUjI1PsLmGtMRsxn9H+wtAvpUcSaN17205SoFd70Si9WoPIaOYfN5ALOQcsO+elWIL X-Received: by 2002:a05:6358:a08b:b0:178:f895:5978 with SMTP id u11-20020a056358a08b00b00178f8955978mr3114486rwn.10.1709663423816; Tue, 05 Mar 2024 10:30:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709663423; cv=pass; d=google.com; s=arc-20160816; b=K4WKbDzTI5GCrjq+ymb7rnZABL8ArDMET79t8eN2xcBza1mMJj03muQIf4b4YU1QLR aecR4mlkIo9Ofxxzfq3YeQPJPjokJrzkPftVay2uu2IhQ2i6RiV+bxL6Fh2mRlPj6Xp2 OAg6dHKS9dV8ut/s9cQeJi74ovtmGo6v21hQ+i4Ww5fXpmCR3nqHUIptMHlMw4AzGyuc PNDWUrhr4NS4EE8nJZOGSEWijU6KtKj0X16cZvD8LbN8OjhLngaaz5QUBEmejaNQXLHw gPihxb+vQfaLD9SEKeuGPW4SrO4lwt1ji1S0nShIAaPoBThi/0Ikspav8aHhF0f2Leew hvSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=auto-submitted:precedence:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:message-id:to:reply-to :from:date:dkim-filter; bh=+hKJ8GqiKJAelrHexYOnM1j3o5SokHZDCrjPucJwQ40=; fh=JvRBH+gcNI2VjTDH/VbzRgYvdrJ8kF/ISNK1Yj+oJjI=; b=Cz+ct4Ry5MHB9ebxNEvdpSQWf5L1W5LE04z7CNgVYLYhdQV5glCSWtpY//47PnNmo+ 5E59j2ueWBAu63oGOWOGE/Maph7R1dJ7vvWLEyYWL5+hP4zTcYKOB5KOsAc2KG/NO5nG 1JyU7Va5DjJk6F0Guin8f0NXtEv0CUmjIr3IsfIxyAc3Mfzb8bCKIzgRetJWhVKMZUqf dDLsqPtydBm/ji+vLbz3+ng0u7I6C8W9FW0RpoxsmC51VGYzT3mderKgkko0cRqvJSCS sACyAWZSnE8E87OB3oKKFajLgC83vtLmBoZQHq05WP72O2rSIU9odVxOFayMOsBxfg/b LaWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-92827-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ey6-20020a0562140b6600b0068f480d8b33si13581719qvb.200.2024.03.05.10.30.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 10:30:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92827-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-92827-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 80EF11C26E3F for ; Tue, 5 Mar 2024 18:30:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 59849199BC; Tue, 5 Mar 2024 18:30:12 +0000 (UTC) Received: from outbound23.service-now.com (outbound23.service-now.com [149.96.6.6]) (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 415A518C1A for ; Tue, 5 Mar 2024 18:30:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=149.96.6.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709663411; cv=none; b=GI/2WfMBFEhm4KQgtgbIPaqC50drdQ73+eM4tYgWwY5kilpbK92Zi9kwnd+KIs9a1zGSPJRh1g+rkVaihrYzKwCJxPLunfyMblhUwZDmXRQF4HsEI/LoaaSWiQTIXjXEdJB5vl7ETKnwqBeJ8a4yM7va433Fw5NnNpg0XvySmtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709663411; c=relaxed/simple; bh=RSjhyZieaHe3/J7/uivBZ3/+tR5GENiOPGAObg91P5Q=; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type; b=dyA80Z/QegzRY2Lds0T+d6ZwUrkK9W0M41MKX2a01SJxeQj0AMiIBE5Vzve9S2/cqM4c4DKa3diM7zgdB8sewqDv81d/XUycyE/9m6jzzn4Src+vSK34LUDtevKWh2vhJS2DjPheI1DZXk9ug86OhKFFnRhsROtte5iILGszNHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; arc=none smtp.client-ip=149.96.6.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Received: from app142018.ycg3.service-now.com (unknown [10.248.3.236]) by outbound23.service-now.com (Postfix) with ESMTP id 969EC421AF78; Tue, 5 Mar 2024 10:30:08 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 outbound23.service-now.com 969EC421AF78 Date: Tue, 5 Mar 2024 10:30:08 -0800 (PST) From: Red Hat Product Security Reply-To: Red Hat Product Security To: security@suse.de, rfrohl@suse.de, cve@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Message-ID: <15436477.7601.1709663408600@app142018.ycg3.service-now.com> Subject: Re: Re: CVE-2023-52572: cifs: Fix UAF in cifs_demultiplex_thread() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7599_6887775.1709663408599" X-ServiceNow-Source: Notification-ec04d32213ede300196f7e276144b04e X-ServiceNow-SysEmail-Version: 2 Precedence: bulk Auto-Submitted: auto-generated X-ServiceNow-Generated: true ------=_Part_7599_6887775.1709663408599 Content-Type: multipart/alternative; boundary="----=_Part_7600_23659363.1709663408600" ------=_Part_7600_23659363.1709663408600 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 Hello! INC2885107 (Re: CVE-2023-52572: cifs: Fix UAF in cifs_demultiplex_thread()) has been updated. Opened for: rfrohl@suse.de Followers: cve@kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, security@suse.de Rohit Keshri updated your request with the following comments: Hello Robert, Thank you for reaching to Red Hat Product Security. I have reviewed the flaws, CVE-2023-1192 has the correct patch used in the reference. Also, CVE-2023-52572 is a duplicate of CVE-2023-1192, which we will soon request for the same. I will also share some observation for CVE-2023-1192 while it us under investigation: ~~~ ## TL;DR After CIFS transfers response data to system call, there is still a local variable points to the memory region, and if system call frees it faster than CIFS uses it, CIFS will access a free memory region when calls function such as `smb2_is_status_io_timeout()` . ## Detail When client uses CIFS, system calls about file operation will call cifs API to send samba request, and there is a CIFS kernel thread handler `cifs_demultiplex_thread()` which receives response from remote server and transfer those data to corresponding syscall request. In the beginning, CIFS kernel thread will allocate memory chunk to `server->smallbuf` in function `allocate_buffers()` and assign the pointer to local variable `buf` . Then cifs kernel thread will get a `struct mid_q_entry` instance from `server->ops->find_mid()` , this struct is used to transfer data between kernel thread and system call. Then cifs kernel thread calls `standard_receive3()` to receive response from server, saving data into `server->smallbuf`, assigning `server->smallbuf` to `mid_q_entry` instance `mids[0]`, and marking this `mid_q_entry` has been received response finally. ~~~ Please let us know if there are any further queries on this please. Regards, Rohit How can I track and update my request? To respond, reply to this email. You may also create a new email and include the request number (INC2885107) in the subject. Thank you, Product Security Ref:MSG86263708 ------=_Part_7600_23659363.1709663408600 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

Hello!

INC2885107 (Re: CV= E-2023-52572: cifs: Fix UAF in cifs_demultiplex_thread()) has been updated.=

Opened for: rfrohl@s= use.de
Followers: cve@kernel.org, linux-kernel@vger.kernel.org, gre= gkh@linuxfoundation.org, security@suse.de

Rohit Keshri updated yo= ur request with the following comments:

Hel= lo Robert,
 
Thank you for reaching to Red Hat Pro= duct Security.
 
I have reviewed the flaws, CVE-20= 23-1192 has the correct patch used in the reference.
 
=
Also, CVE-2023-52572 is a duplicate of CVE-2023-1192, which we will s= oon request for the same.
 
I will also share some= observation for CVE-2023-1192 while it us under investigation:
~= ~~
## TL;DR
 
After CIFS transfers respo= nse data to system call, there is still a local variable points to the memo= ry region, and if system call frees it faster than CIFS uses it, CIFS will = access a free memory region when calls function such as `smb2_is_status_io_= timeout()` .
 
## Detail
 
When client uses CIFS, system calls about file operation will call cifs A= PI to send samba request, and there is a CIFS kernel thread handler `cifs_d= emultiplex_thread()` which receives response from remote server and transfe= r those data to corresponding syscall request.
 
I= n the beginning, CIFS kernel thread will allocate memory chunk to `server-&= gt;smallbuf` in function `allocate_buffers()` and assign the pointer to lo= cal variable `buf` . Then cifs kernel thread will get a `struct mid_q_entry= ` instance from `server->ops->find_mid()` , this struct is used to tr= ansfer data between kernel thread and system call. Then cifs kernel thread = calls `standard_receive3()` to receive response from server, saving data i= nto `server->smallbuf`, assigning `server->smallbuf` to `mid_q_entry`= instance `mids[0]`, and marking this `mid_q_entry` has been received respo= nse finally.
~~~
 
Please let us know if= there are any further queries on this please.
 
R= egards,
Rohit

How can I tra= ck and update my request?

To respond, reply to this email. You may also create a new email a= nd include the request number (INC2885107) in the subject.

Thank you,
Product Secu= rity

 
Ref:MSG86263708 ------=_Part_7600_23659363.1709663408600-- ------=_Part_7599_6887775.1709663408599--