Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 695463DE457 for ; Fri, 24 Apr 2026 14:45:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777041902; cv=none; b=YAh1dsnwprFadxS0RBSkg37NuTNfDNW6ooOu7Mqq6rHO+n515jSzL9hsHMkjfdfFKaD2WPas23KkrCtRCpmPB2m3BqDWapKLaU6OSab4pcRO6c9MxERNXw/0aslpQfzRGJ+2S4Ax8F0loWTOflCjy3Zw+XpESqUvdX4YCYdcVNk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777041902; c=relaxed/simple; bh=YszMnjhkT/1BIDxULm/QeY4zfuU/seAGMLA9orxciMk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=o3VTDK4Ham437BGDNSiwebe3cJ7jrxfsk+c4Go7Q6zGEsMyYjrRGBk6NPihgyWVfrCWicbR1zEPqracmQGVXCMFG2NDU5VHNM9wZ7K3mMJv1t4Hy4i+RR1l9749KlYdmDgn2o0hF3Zo344FdFNNZRlz9Hhn5YcTfEmYLI3oZGAs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=N578zyjJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="N578zyjJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1AC5C19425; Fri, 24 Apr 2026 14:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777041902; bh=YszMnjhkT/1BIDxULm/QeY4zfuU/seAGMLA9orxciMk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=N578zyjJ80vCRA13xrMvAziBVLcICc5S4lJ4JxLfqkO0w9TCNOVwoQek2oLTfqX3W 3hEkHnrHNgPazQKUFmsye9u54YSub2QE8EdGxpkHCvdQ66Kwb/Oc/tOh+i2zQF6PzB Jqeu8Y6xhhTStQaLIlb7MuViwEXrDBm8bBAmbZ8c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31616: usb: gadget: f_phonet: fix skb frags[] overflow in pn_rx_complete() Date: Fri, 24 Apr 2026 16:43:52 +0200 Message-ID: <2026042423-CVE-2026-31616-ace5@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2805; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hxqcHrdK92bcpjBZQl5ddg04qO4IP63xSdljWvHTFGk=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmvG3v23eKzufwl/dX72lfVp5gvvC740/20xGDqsU3Oc 2bMrO7W6ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJvJBhmKfz2K2A5bbvtNt5 v36HPS9kDjjbv55hfvznXamW/t5Nohf+lip5vDKdvfTVDQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_phonet: fix skb frags[] overflow in pn_rx_complete() A broken/bored/mean USB host can overflow the skb_shared_info->frags[] array on a Linux gadget exposing a Phonet function by sending an unbounded sequence of full-page OUT transfers. pn_rx_complete() finalizes the skb only when req->actual < req->length, where req->length is set to PAGE_SIZE by the gadget. If the host always sends exactly PAGE_SIZE bytes per transfer, fp->rx.skb will never be reset and each completion will add another fragment via skb_add_rx_frag(). Once nr_frags exceeds MAX_SKB_FRAGS (default 17), subsequent frag stores overwrite memory adjacent to the shinfo on the heap. Drop the skb and account a length error when the frag limit is reached, matching the fix applied in t7xx by commit f0813bcd2d9d ("net: wwan: t7xx: fix potential skb->frags overflow in RX path"). The Linux kernel CVE team has assigned CVE-2026-31616 to this issue. Affected and fixed versions =========================== Fixed in 6.12.83 with commit c9315ce9da3632c591666a29de82d3e92d46bec1 Fixed in 6.18.24 with commit 4e476c25bfcab0535ba7c76a903ae77ca8747711 Fixed in 6.19.14 with commit bd44ce09b9b569f49ed13e2d87d23d853fc7d6a7 Fixed in 7.0.1 with commit 66f7471c4042e4eb300e30b5b9d87d1406862673 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-31616 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/usb/gadget/function/f_phonet.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/c9315ce9da3632c591666a29de82d3e92d46bec1 https://git.kernel.org/stable/c/4e476c25bfcab0535ba7c76a903ae77ca8747711 https://git.kernel.org/stable/c/bd44ce09b9b569f49ed13e2d87d23d853fc7d6a7 https://git.kernel.org/stable/c/66f7471c4042e4eb300e30b5b9d87d1406862673 https://git.kernel.org/stable/c/c088d5dd2fffb4de1fb8e7f57751c8b82942180a