From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796042764; b=DhKXGuZBzkBCMm29p1Xoq4KJK2RUkqIry/AkqN9Z8vmr4BkFU9IZf5vnjPpLXoLckbdj vCD7CRaA5m6RN+k/ohNwhMjS21ENrSUp3Z2+cx6HST15hlCElpOedVTxD0k7nSnyyK2O5 72fz67BYN38Wq8PxINiluAq4jUavkKqgTcYSaekPyiLJlr1ojsH3sdCgpGQVw2aQNSzgm 8dhsNF0D7CgvrHgfqszkZmsTENni/MVoa81EG6HXFh5b+2mFtgRltxccIlhYCiduQjhRI 29I4l9WjGpSO7txH8vfd0C8/A/XYWBjFPTmh6tMb4D4oE8Nw9mMax9bfENcZmjxx1hg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796042764; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=PCJe4u5rxtN+6b1xqX88bvBZRjrM2CNM9829GOibNUE=; b=TLHqMSpTy7z0IUGTwVnr0UihO0lwwvupS/4bojAJVnG/nEc5r/+V3EqIzgNRoeq381wW UtxLYSK3dpUHVm23NUVPjvlm8HrZ3KmunAQUb399qi7kJ6QybHP8OBwz+jXG70VoOMvQ4 Ywz46HP8nrTFm1Tz5tSvaBFXYfZAtjwoB34+/105vY4f+C0tTYwo6uGhHj6GgjX6tSyk5 3Oi3XwetTqbws4lhJcw9xbhl6HzXPCcJJXi3qjmHtLhUgTuLMQAsu8/FG9vk9ZIxszn88 RFHiKT3WiIig8R7SDY9piR6p2fM4aE3B6xiBzsOATf5pjJbg9ZsaW8QkbD3KMA2Z1Zw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="lHP/7918"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C39DB606A31C for ; Mon, 30 Nov 2026 12:46:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lHP/7918 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC5DA1F000C1; Mon, 30 Nov 2026 12:46:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796042763; bh=PCJe4u5rxtN+6b1xqX88bvBZRjrM2CNM9829GOibNUE=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=lHP/7918NohzeQ8ErXZ/cUU2z0VmM0AxWcV2upNfxxSZ0I8Ajia//fRfcL5zungyN d5rkjbgtRhrJmoBvcS+JxIIJzuppZYDxV+hkklv97KAH3v0vm4A64l8OzGZwysG8A+ 86QvbfclngXBIioz0iOZgK/tz0xDWHRvxYhCLDrxIqkC4DR+DPZ2wDcomYz3JGl1wB 4DjgLN8aX09vj1l9m/PkaZABwpnN4vDPj9hpFZscdvmbUtnN4UWcCN7l/M/7S+8zh9 7Y0jyNLJgWiUsmvPW3D3dVpRXWS2KcFaLbRpSpL5pOP8h0VbFidHedRHx208zjaNNU /WAaHrLLQSnkQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] USB: serial: opticon: fix use-after-free in write completion Reply-To: sashiko-reviews@lists.linux.dev To: "YuanZhe Liu" <25031212351@stu.xidian.edu.cn> Cc: linux-usb@vger.kernel.org In-Reply-To: <20261130122213.11578-1-25031212351@stu.xidian.edu.cn> References: <20261130122213.11578-1-25031212351@stu.xidian.edu.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Nov 2026 12:46:03 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > The write URBs are anchored in a per-port anchor that is embedded in > the driver's private data, but the anchor is never drained when the > port is removed. >=20 > The close callback does kill the anchored URBs, but it runs before the > line discipline is released: tty_release() calls ->close() before > tty_ldisc_release(), and some line disciplines (e.g. ppp) call > tty->ops->write() directly from their transmit path. A write > submitted after the close callback has drained the anchor will > therefore remain in flight until the port is removed, where the > deferred giveback of the URB accesses the already freed private data: >=20 > BUG: KASAN: slab-use-after-free in usb_anchor_suspend_wakeups > Write of size 4 at addr ... > ... > [ ... ] > Co-developed-by: Bin Yu > Signed-off-by: Bin Yu > Co-developed-by: Cheng Wen > Signed-off-by: Cheng Wen > Signed-off-by: YuanZhe Liu <25031212351@stu.xidian.edu.cn> Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261130122213.1157= 8-1-25031212351@stu.xidian.edu.cn?part=3D1