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=1796469601; b=U+GSnQx+WU0kBWNBKBwZ0gBRZ/0RMJiCEPwSDmVe1oz9EMd66Z0PBqlCzkyLAMYspAUp SaqlDS5xh+5S0Rgf4UJJd7dO8q4cy1q5WWhGqML3p743JdffFbtn6TaLGT/pXR1TD0KBZ 1hgvexITZi5jGM6rmoszJsNDsGqdH/iQsOPMXkCXT26nibligrYGWCQhJ2EEI7w9TfA/B qs2oSfNjIaR6ABB6GduVekz5ocu0vdPTghpwnEqC1EM8OYCz9X2TuCuN1U8zrBW4BYbwK Rh52U3IZz/SLE4E9nJfqnnQOCjE4JqG9fpFxswCY8EGiMgUB48EV5s08a8GkFmTqNPQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796469601; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=9iwf/rXPMI51bnTNVIFegG8xc0rB0SJkw2RNOG5TJH4=; b=aoM5SitO0zzMrPvV+YQXzk2St8tHtRjalNjyQQBsbDlxnjoHlYULPt19NDY4KVuM2Rxp 8hVYGxgttidWT7q+g04dMKG3/3QtAwXAqQARWcbljCFB94LaxXI2ydqrgE8Z5dMNOD04e MsqfhGi7agkCTkroifYhtsThOMrBU1NRAXPREW3WtbQJEEahD4oueovbRuWIoq1Cr0XwU oWx1L1E0i5PR0iCockZk+75MuHHNC0syWP/5kUiCMIuGRXcqhT7Eb3czd+SeWNgzHXDaN PEhxl5CWu8dX6EcpjhTxK9wXHI6G5x688t4yGhTm/lxCZfu07iD8a3TNyRJO2QFu28g== 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=klj6ZBVJ; 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 F0A58606A33B for ; Sat, 5 Dec 2026 11:20:00 +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=klj6ZBVJ Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAC441F0092B; Sat, 5 Dec 2026 11:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796469600; bh=9iwf/rXPMI51bnTNVIFegG8xc0rB0SJkw2RNOG5TJH4=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=klj6ZBVJ76EVHrHFbr8WK51LxjlnnUj6pT92Aozb429C4QZ6w3OAe6rJoOzM9YOi7 PUsYrP+TZJXQJv45nZRCP9X+vUIeORdNyecCY/tNi/hBNcysp5JioNzMGU/y9T+fTh hqg5vR05TkJDpzVl3VCd9/gJkp+iouLKoZkLD87gGrr/usKiukY77pOe3DFTZheGUI 8deQlL/MHKblqeBStkO4II61NAz38YxnKk0sjzlmcDI348mdwuqazJpMo2ybYo8ZIW vxNSBDiLGpE4EQA04qHDdRQLlu8llMcC9qY9la9ckpbN8zzn3aonqz/DwsglNxpF6C Tkfjq8l1ksxrA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 6/6] usb: gadget: f_uac1: fix feature unit and AC header descriptor leak Reply-To: sashiko-reviews@lists.linux.dev To: "Vineet Thakran" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261205110831.204588-7-vineet789thakran@gmail.com> References: <20261205110831.204588-1-vineet789thakran@gmail.com> <20261205110831.204588-7-vineet789thakran@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 11:20:00 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] usb: gadget: f_uac1: missing Fixes tag for commit b8fb6db6cb04 -- commit a85ccf2bbf11aaa9c0c1c9b9110fcce6fe4b8e2f Author: Vineet Thakran > usb: gadget: f_uac1: fix feature unit and AC header descriptor leak > > f_audio_bind() allocates the AC header and feature unit descriptors and > stores them in the file-scope ac_header_desc, in_feature_unit_desc and > out_feature_unit_desc pointers, which are freed only in > f_audio_unbind(). When a configuration contains more than one f_uac1 > instance, each bind overwrites the pointers left by the previous one, > and those descriptors are leaked. This is the same problem syzbot > reported for f_uac2. > > usb_assign_descriptors() copies the descriptors into the function, and > since the previous patches nothing uses them after f_audio_bind(). Make > them local variables of f_audio_bind(), pass them to setup_descriptor(), > free them on every exit path of f_audio_bind(), including success, and > drop the now redundant kfree() calls from f_audio_unbind(). > > The static f_audio_desc and f_audio_ss_desc arrays used to take the > address of the file-scope pointers. Their entries become NULL > placeholders, and setup_descriptor() now fills in the AC header entry of > f_audio_ss_desc the same way it already does for f_audio_desc. > > Fixes: 254cb1e0d78c ("usb: gadget: f_uac1: disable IN/OUT ep if unused") > Fixes: 0356e6283c71 ("usb: gadget: f_uac1: add volume and mute support") > Cc: stable@vger.kernel.org > Signed-off-by: Vineet Thakran [Severity: Low] Since this also fixes f_audio_ss_desc[1] taking the address of the ac_header_desc pointer instead of storing the allocated descriptor in setup_descriptor(), should this include: Fixes: b8fb6db6cb04 ("usb: f_uac1: adds support for SS and SSP") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205110831.2045= 88-1-vineet789thakran@gmail.com?part=3D6