lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2f0148fa-ba18-4711-81dd-89da3bdd1627@rowland.harvard.edu>
Date: Wed, 6 Aug 2025 10:48:27 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Xu Yang <xu.yang_2@....com>
Cc: gregkh@...uxfoundation.org, mingo@...nel.org, tglx@...utronix.de,
	jun.li@....com, viro@...iv.linux.org.uk,
	thomas.weissschuh@...utronix.de, andriy.shevchenko@...ux.intel.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	imx@...ts.linux.dev
Subject: Re: [PATCH] usb: core: hcd: fix accessing unmapped memory in
 SINGLE_STEP_SET_FEATURE test

On Wed, Aug 06, 2025 at 04:39:55PM +0800, Xu Yang wrote:
> The USB core will unmap urb->transfer_dma after SETUP stage completes.
> Then the USB controller will access unmapped memory when it received
> device descriptor. If iommu is equipped, the entire test can't be
> completed due to the memory accessing is blocked.
> 
> Fix it by calling map_urb_for_dma() again for IN stage. To reduce
> redundant map for urb->transfer_buffer, this will also set
> URB_NO_TRANSFER_DMA_MAP flag before first map_urb_for_dma() to skip
> dma map for urb->transfer_buffer and clear URB_NO_TRANSFER_DMA_MAP
> flag before second map_urb_for_dma().
> 
> Fixes: 216e0e563d81 ("usb: core: hcd: use map_urb_for_dma for single step set feature urb")
> Cc: stable@...r.kernel.org
> Reviewed-by: Jun Li <jun.li@....com>
> Signed-off-by: Xu Yang <xu.yang_2@....com>
> ---

Acked-by: Alan Stern <stern@...land.harvard.edu>

I guess we both overlooked the fact that the URBs used in this debugging 
pathway get submitted in two partial steps.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ