Article View: linux.kernel.netdev
Article #16916Re: [PATCH] net: hso: cap the MTU to the mux tx buffer size
From: Aibing Chen
Date: Mon, 16 Nov 2026 02:58
Date: Mon, 16 Nov 2026 02:58
28 lines
10127 bytes
10127 bytes
On Mon, 16 Nov 2026 01:53:34 +0000, netdev-bot+sinfo wrote: > - How the issue was discovered, e.g. hit in production, hit during > development, syzbot report, manual code inspection, LLM or static > analysis tool scan. Code inspection, prompted by the automated review of the companion skb_tx_buf fix in the same driver: https://lore.kernel.org/all/179477764293.3136.7267245337781305691@kernel.org/ That review noted that hso_net_start_xmit() copies skb->len bytes into the fixed MUX_BULK_TX_BUF_SIZE (2048) buffer with no bound check, and that hso_net_init() never sets max_mtu. Both statements check out in the source, which is what this patch addresses. The syzbot memory leak that started the series did not touch this path. > - Whether the issue was actually triggered, or is only theoretical > (e.g. found by LLM and not proven at runtime). If it was triggered > please include the symptoms, like the stack trace or kernel messages. Theoretical: the overflow was not triggered at runtime and the patch carries no runtime repro. The overflow is statically decidable from the code (unbounded memcpy into a fixed 2048-byte allocation, plus the missing max_mtu), so the fix stands on inspection alone. I chose the max_mtu cap over a runtime length check because the default MTU already fits the buffer with the same 14-byte allowance, so there is no reason to allow a larger one.
Technical Details
Message-ID:
<20261116025806.244-1-chenaibing@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364021-linux-kernel-netdev=dewy.ruReferences:
<20261116014904.556-1-chenaibing@cmss.chinamobile.com> <179479401486.3291.17345716560777690357@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364021-linux-kernel-netdev=dewy.ru From: chenaibing@cmss.chinamobile.com (Aibing Chen) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] net: hso: cap the MTU to the mux tx buffer size Date: Mon, 16 Nov 2026 10:58:06 +0800 Organization: Usenet Network Message-ID: <20261116025806.244-1-chenaibing@cmss.chinamobile.com> References: <20261116014904.556-1-chenaibing@cmss.chinamobile.com> <179479401486.3291.17345716560777690357@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1963238"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:erI3rKo31yrA/nzRDA9QMV4MXug= sha256:VRy4FXgeSx0bLL5onpfiR+KlyDVdmzPpuMA4h/n2dbs= sha1:vrFWiGhZEodG8gJxHRr6E2VfnII= sha256:rLcQ62xc0bQwa0mo0l45OlDsr+4KgaO9RRytNf/k+H8= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 5D39F114B04; Mon, 16 Nov 2026 05:58:38 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.651 X-Spam-Status: No, score=-1.651 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3pHst-Pb1oWs; Mon, 16 Nov 2026 05:58:34 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-364021-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 888EF114B02; Mon, 16 Nov 2026 05:58:23 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id B5BFE27EF6; Mon, 16 Nov 2026 02:58:20 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794797900; b=uw8MDx1dbxZQvTWBe4zJpFeYoKnDaWB7GwdfVzbcOkmtDYglWnBi9EeuBEWjxvur+3cv MzvosIWqUD736wMjhZWTW7K4XSwiHSxhLE9yCLdn2xm/4C13Nr3GkJ8kW46AtLVg1urWT isbOd5WxpXfn0Pyu+pqsCohqqgH4z6/pIFfGEJBVHWhaTwLlEgAS0hML9il34saqQlU2d KcKIGs8LvDDxOs7ksE/W9YuHIEi1ou2UZqO1DniP+cgIh9wvWXJ54ZqMfMVUR6TawvIP/ OpCzpkny2Crcpyig4kYECx46ohGQSsqI5TQxxJcshCgPwnQbL2ospQquhGoDfrVUf5A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794797900; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=Pz245/qiYdhAlbrbZ9JGtp5YOswGm+RxhscLH6qfgIM=; b=TrR6Okq2aIHRIH5Iox3zIB9MtN+NMSQWeJlwb9166iZNbiia3gwIcbaC9ZOHFnPT/Igv UINqcb3DW6TGDPDgowlwpQ347tfeMDyw7L238+8+/ZlVBt7cZzTXMoZsar6F9ghTwqdZ5 BnARNz3jMpI25hVnF++FmjyKVxzsqqhj7bberiF9k37FVK9cGObrwQH6ouBaQ/WuU7w85 HxTPkY86jixlzB6mVlNFyDrI169nZx0wMWwcDidyvGIA1Q+b9U5QVj2XREvalF9XrUILr x+TzXSndf97Ou4YMW6FPIbio+nhvFawQ8w/KsgXC9p5tmI8EWk/DwBbRd7G9/W+vQzw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=sBpx3Ibm; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C00C606A333; Mon, 16 Nov 2026 02:58:20 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=sBpx3Ibm X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794797894; b=sibFP0nBZPrdIOXtU8VuTIGI42CMXB+E/w7BewOiGptxzCUIpsYFPzOwgtR/QkuN+EPv zgw/H4JnBRmEA93KhHT/DOW3JKIwJKksABrGlOrAzXw0URhlzqDXWYzRg1AjALAgxCjKQ AqDHm4repp5frJQpL+08ykpP2lw8KvWgIDMyqIgAFMBh66pnPhxrt2n7u39fDVkCG/Q9o FeGvLbhUxEH8+sONyjwKUlKTypFrKAm905TxTdlYvYf0XBs+7aMPd8psg9AyuagZMZR8O gjfnBGnL198ovA7Hfk0RlEdpgFlUmZG+XHBDQs6MNefeuqsipwt7NyAUNi7l1gK5Zow== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794797894; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=Pz245/qiYdhAlbrbZ9JGtp5YOswGm+RxhscLH6qfgIM=; b=YKiEAS0e8zat9ZYvCAAN6OwQgR2wfesgpJOGIfE9tRwKtzNYvMpH98o1SypPAWXCXF8z 7wqv8GGpgBfn4OoyD3rOcwvK3dN8n8+z/X8FLdY0CdgT4lfhzojdLTkd5DUimqU3bp3PQ 902+MyitTPffYQkySu8WpTvfJelYETaCOh1SyMhqsbbozjyB3OV4iT86kcVxB6UKRL+6G 76D3UgjAy1wjq4GLBdUDkdJO/hwJMDy6Ybr73BBF7NIlAr6gWxXGyHD5txMFZcqrIVHK5 QkC1+yADdUI1D2IjKSXKOlpWhWnT425MDsSQScLSapC/gL+8xyITH0oCvcWs1/lcKew== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=sBpx3Ibm; arc=none smtp.remote-ip=111.22.67.139 X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 463A6606A323; Mon, 16 Nov 2026 02:58:10 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 463A6606A323 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=sBpx3Ibmg/ey4nt9IsmrNa9gaEQTukyE5dcsTHQrmUhG35IBjUHuIRujbOhyWo8+ueHLRrZ6gS14+ DFldiIZ/s701n1Iu3nzNV5CMKJ/UyzHxSgets3uriQZcIk1rSFC5OZEwUSGDL7bQGWJjVjm3TNSSxE TQlP6A47Efq10Q0s= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee96afa7140acc-0018b; Mon, 16 Nov 2026 10:58:09 +0800 (CST) X-RM-TRANSID: 2ee96afa7140acc-0018b X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from FHD-W7400297 (unknown[10.55.1.70]) by rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id 2ee76afa713e7df-79766; Mon, 16 Nov 2026 10:58:09 +0800 (CST) X-RM-TRANSID: 2ee76afa713e7df-79766 X-Cc: Aibing Chen <chenaibing@cmss.chinamobile.com>, netdev-bot+sinfo@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.50.1.windows.1 X-In-Reply-To: <179479401486.3291.17345716560777690357@kernel.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list