πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21214

Re: [PATCH] net: wan: lapbether: validate frame length and headroom in lapbeth_rcv() and xmit

#21214
From: Martin Schiller
Date: Mon, 23 Nov 2026 18:27
29 lines
10435 bytes
On Mon, 21 Sep 2026 00:34:45 +0200, netdev-bot wrote:
> - [High] The commit message describes two changes that are not present in
>   the diff.
> - [High] In lapbeth_rcv() (drivers/net/wan/lapbether.c:135-142) the wire-
>   supplied 2-byte length `len = skb->data[0] + skb->data[1] * 256;` is…

I agree with the review. The useful part of the change is the switch
from skb_trim() to pskb_trim_rcsum(): skb_trim() warns and does not
trim at all if the received skb is nonlinear. That is what the commit
message should describe.

Hui, for a v2 for net, as a new thread with [PATCH net v2] in the
subject, please:

- describe the actual change and its effect;
- drop frames whose length field is larger than the received data,
  as the subject promises;
- count skb->len after the trim instead of the length field;
- drop the Assisted-by: line, as for the lapb_decode() patch.

Charging the receive counters to the Ethernet device instead of the
LAPB device is a separate issue and can be a separate patch.

If you don't have time for these two patches, let me know and I'll
take them over.
Technical Details
Message-ID: <c16e43680ec701ef94f3f40499fc345a@dev.tdt.de>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369660-linux-kernel-netdev=dewy.ru
References: <20260919223433.3882618-1-benquike@gmail.com> <178994368506.2160803.16241878291781749602@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369660-linux-kernel-netdev=dewy.ru
From: ms@dev.tdt.de (Martin Schiller)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] net: wan: lapbether: validate frame length and headroom
 in lapbeth_rcv() and xmit
Date: Mon, 23 Nov 2026 19:27:20 +0100 (CET)
Organization: Usenet Network
Message-ID: <c16e43680ec701ef94f3f40499fc345a@dev.tdt.de>
References: <20260919223433.3882618-1-benquike@gmail.com>
 <178994368506.2160803.16241878291781749602@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3951185"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:5c7li4lS7DUvkpb6C5M0PHBraRU= sha256:ttOce6I6hkF5MirENaRBNAAEGKO5p8p+f2f20p+s1oM=
	sha1:kBYPNKFJzWEKl78rrbqAzSfirvo= sha256:lTCr4xU2f3woQ2pB0icshfDHl29UJfEVZE5eLPrXsCM=
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 9F3E6125DC2; Mon, 23 Nov 2026 21:27:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-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=pass (2048-bit key)
	header.d=dev.tdt.de
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 0Tt8g-9ByLAt;
	Mon, 23 Nov 2026 21:27:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-369660-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=dev.tdt.de
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 55510125DB9; Mon, 23 Nov 2026 21:27:38 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 83C2A3137A; Mon, 23 Nov 2026 18:27:36 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1795458450;
	b=wGEvf3teGm9twXnDmW1TvAdHgXRP7E2mE4i+i5/olKnblC7Ux4cKRCoAD0ZzMIOUULfD
	 G3cY/iVXhyxkLCwTSjlhtONBfK4Xzmz/spFA5NZDTfN7C0dTS13PlM54/ZKy7/dKzpjoN
	 yHDqtsw9/luNgpxiwNdQgUnm6frs2SjMKL547AA6heTOKeiew1c63TDkF2gHqLhI+BpK4
	 YW+pehAk7Vf+RRJVF+nmjVogIVKKaELPf6eFgN2/9sXiWzMTnewV1CqQlHvm+kNOCBFYA
	 Wc8tInorSwaiPWiif1L56AdJNKcCaYgBi/4SyHlfiE80TrN2suHIIino2dfSltpMRBw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795458450;
	h=X-Original-To:Received:DMARC-Filter:Received:Received:DKIM-Signature:
	 Received:Received:Received:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Date:From:To:Cc:Subject:Organization:In-Reply-To:
	 References:Message-ID:X-Sender:User-Agent:Content-Transfer-Encoding:
	 X-purgate-type:X-purgate-ID:X-purgate;
	bh=KYU9FnKKEwUpONcl8aqvXDzyTNAbdpw9nzDao/RcizU=;
	b=R0jh51A+zjooYb8UYFCsQi23ZBizq7+5XO37ldtxGHmW4/TAIfc1MeiXshbgl4itzw4V
	 bhcqjIGF28wx/mwZ5y5TlRtteDdRHoOKQcGEdm9+jUXqaa75/pLSmGUNxIcj4HInq8u4i
	 /lZ40G52KC22yUroIoBPkITOnp+ch/YOZMSUPT2L6OYe8NHL030ytXWuVynl6tK63uryr
	 BWhLZNCylNjBVGVdxOHxBQMURuymMoqkmElwe9HZnHQmBFEsDJl8jq7B8nichl9Mn7vAN
	 XvMmYt8XMIEK84wYp4cYP3fd5ecM4SmWJiyO8IcBQGi9yeLiWEnwS9j0vhroS1xCMLg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=temperror header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256 header.s=z1-selector1 header.b=ntK9UZT0;
	dmarc=pass header.from=dev.tdt.de;
	spf=pass smtp.mailfrom=dev.tdt.de;
	arc=fail 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 BC1EB606A333;
	Mon, 23 Nov 2026 18:27:30 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=temperror header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256 header.s=z1-selector1 header.b=ntK9UZT0
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.37.255.70
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795458449;
	b=adDRDnh+cMlCOoUjh7zvgks5p8KOCmauOkWBT9NWt105DnPEV4eIdFdmW1efMhS2nZZ/
	 Kd3L9TfRUNRaaNZfEI8dwuluT5L+4rWYn27aIJPu44hVzWwGodb5mcdeEduwiEWi6npgq
	 QSRVgG2aYqnK6g16sOltIvz7cVM5GuGJIdIrP9j4xjGL5zWBC2dGQKaiEPk6Hl9yWxWjO
	 HUtvLfwRpSppmMCb+IQjElH5bj4QACI2TY14D+aZLWW8BfTGjDv7a8Hz6tVAzoSnBWLWD
	 uHMJ7hsKbGRC4UOhsQLwBRiDX39UZewhPccScyqeK+M9rAga8a02nRghTYON+wBhi5A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795458449;
	h=DMARC-Filter:Received:Received:DKIM-Signature:Received:Received:
	 Received:MIME-Version:Content-Type:Date:From:To:Cc:Subject:
	 Organization:In-Reply-To:References:Message-ID:X-Sender:User-Agent:
	 X-Spam-Status:X-Spam-Checker-Version:Content-Transfer-Encoding:
	 X-purgate-type:X-purgate-ID:X-purgate;
	bh=KYU9FnKKEwUpONcl8aqvXDzyTNAbdpw9nzDao/RcizU=;
	b=AHOZZ7U6MmlKF+igd8TNTV1sCQ3398bMkWHNyItTQ1YsD3yTebvgvuqDNRHmK29jvICi
	 lZjGfj8YAcyo3ZHMRfgYKMVOvXhYjNCbskoBKWJgK3KWUTyte1rSugIZSPEXuN9JkdN4e
	 c4gsxq8hTfeERq2f8nrQGST4bBMwzBv1CdM1zOeBGe9MMX1x6qoVOKiN4JqzqNye4rOOY
	 lMsRBlPQlzi7y7nwxIvnnYI4Xw+lz+mq8ZdPsGnpRY/7YubeyfdygrLmfnoPIEiDAKnRC
	 E30d9WgVs7N8w4R9Agz4S+yMSYe4f9i8rZg64trx5XAm8A75Yie85t2MdZ8YiHXdiKw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=dev.tdt.de;
	spf=pass smtp.mailfrom=dev.tdt.de;
	dkim=temperror header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256 header.s=z1-selector1 header.b=ntK9UZT0;
	arc=none smtp.remote-ip=194.37.255.70
X-Received: from mxout70.expurgate.net (mxout70.expurgate.net [194.37.255.70])
	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FDFC606A31A;
	Mon, 23 Nov 2026 18:27:29 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6FDFC606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dev.tdt.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dev.tdt.de
X-Received: from [194.37.255.9] (helo=mxout.expurgate.net)
	by relay.expurgate.net with smtp (Exim 4.92)
	(envelope-from <prvs=68018334f9=ms@dev.tdt.de>)
	id 1xVYl8-00ARxz-Mf; Mon, 23 Nov 2026 19:27:22 +0100
X-Received: from [195.243.126.94] (helo=securemail.tdt.de)
	by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <ms@dev.tdt.de>)
	id 1xVYl7-00HKPk-T1; Mon, 23 Nov 2026 19:27:21 +0100
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev.tdt.de;
	s=z1-selector1; t=1795458441;
	bh=KYU9FnKKEwUpONcl8aqvXDzyTNAbdpw9nzDao/RcizU=;
	h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
	b=ntK9UZT0e98jDxbu56SLpejGePiq+hmGziOaymKRMoUK/HB7oR80tK/gRGMidMXTf
	 wXFqcxs22JxYEv+FEty+9/PZzuO2UxXCptKH9PhSzFoJgfeSo1fHeSA5ffx9Q41DJN
	 36sOmm5rUHCapPaAEHrmR5phB5szfnhponty8S4uA1pLdnP4o87pIxp7Tp2M+JDMDY
	 t8/5mKUL4Q+8Te9FXvvp9PnVeWWkUjdDgS8IUmPTZnVsd2G14TtqRL09HkdBhUCsZG
	 EFjZjgsoEn+RSej1OOtM1EhismCre9gTN5TqG/ouUTwi4wfljI7TFMp5xYyaTfjHl7
	 vGEab63pl61mg==
X-Received: from securemail.tdt.de (localhost [127.0.0.1])
	by securemail.tdt.de (Postfix) with ESMTP id 2980B240041;
	Mon, 23 Nov 2026 19:27:21 +0100 (CET)
X-Received: from mail.dev.tdt.de (unknown [10.2.4.42])
	by securemail.tdt.de (Postfix) with ESMTP id 21DAA240036;
	Mon, 23 Nov 2026 19:27:21 +0100 (CET)
X-Received: from mail.dev.tdt.de (localhost [IPv6:::1])
	by mail.dev.tdt.de (Postfix) with ESMTP id D344A2AE6F;
	Mon, 23 Nov 2026 19:27:20 +0100 (CET)
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
X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, linux-x25@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-Organization: TDT AG
X-In-Reply-To: <178994368506.2160803.16241878291781749602@kernel.org>
X-Sender: ms@dev.tdt.de
X-User-Agent: Roundcube Webmail/1.3.17
X-purgate-type: clean
X-purgate-ID: 151534::1795458442-79D55B36-477689C0/0/0
X-purgate: clean