🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24661

Re: [PATCH] net: rose: fix OOB read in CCITT facility parsing

#24661
From: Bernard Pidoux
Date: Mon, 30 Nov 2026 15:22
29 lines
12808 bytes
Hi Tanuj,

Thank you for the answer.

One thing to know before you open the pull request: the mod-orphan
main branch has moved since your patch.
While reviewing your fix, I found two smaller bounds problems in the
same facility parsing code.
They are independent of yours, and they were merged today as pull request #96:

04f81e5 rose: test the length before the next byte in the facility loops
b4451d3 rose: count the length byte when checking the facilities length

The first one changes the loop condition in rose_parse_national() and
rose_parse_ccitt() to "len > 0 && *p != 0x00", so the byte after the
field is no longer read when nothing is left.
The second one makes rose_parse_facilities() reject facilities_len ==
packet_len, which was accepted with one byte missing.

They complement your fix and do not replace it.
The 0xC0 case of rose_parse_ccitt() still has no "len < 2 + l" check
on the current main, and your two lines still apply cleanly on top.
Please base your branch on the current main.

Once your pull request is merged, I will send it to the stable
maintainers for 6.12.y and 6.18.y together with these two commits.

73 de Bernard, F6BVP
Technical Details
Message-ID: <CAFAa3YAEhKBBzQxnUOhEgoWPuM1V55Y=4bXfZ2i62ApXmu=tBA@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!news-lon.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-374270-linux-kernel-netdev=dewy.ru
References: <20261123183818.24508-1-ertanuj96@gmail.com> <2026112418-freebee-tasting-68ba@gregkh> <20261125104157.265662-1-bernard.f6bvp@gmail.com> <CAAnb6FSz3mbTOPmXg3AAq3qJ4NaDxEeG65Jt5K7-aVMiq2_70g@mail.gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.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-374270-linux-kernel-netdev=dewy.ru
From: bernard.f6bvp@gmail.com (Bernard Pidoux)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] net: rose: fix OOB read in CCITT facility parsing
Date: Mon, 30 Nov 2026 16:22:28 +0100
Organization: Usenet Network
Message-ID: <CAFAa3YAEhKBBzQxnUOhEgoWPuM1V55Y=4bXfZ2i62ApXmu=tBA@mail.gmail.com>
References: <20261123183818.24508-1-ertanuj96@gmail.com> <2026112418-freebee-tasting-68ba@gregkh>
 <20261125104157.265662-1-bernard.f6bvp@gmail.com> <CAAnb6FSz3mbTOPmXg3AAq3qJ4NaDxEeG65Jt5K7-aVMiq2_70g@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
	logging-data="1455675"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:WPWjP4NOBKkKoPSVgpy1lZiod6E= sha256:GY14vswctPfl1CSHGPo7dWnQQptPG7IMTccaPRZJzCI=
	sha1:cQTX6C1BeMQTheeBZPQc/rhn8dk= sha256:26T4aw977dP9g8HpfmpNGjkZW5GjgbMWoZ2Rfp+nV88=
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 D40A3125FEE; Mon, 30 Nov 2026 18:23:08 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.149
X-Spam-Status: No, score=-3.149 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
	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=gmail.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 3ElpGfs8KJR2;
	Mon, 30 Nov 2026 18:23:03 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374270-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 97297125FF0; Mon, 30 Nov 2026 18:22:54 +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 0F014284C5; Mon, 30 Nov 2026 15:22:43 +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=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796052161;
	b=jkoRed3/pJJPNKdJkcIrk4osBBBeLM25d+Lhs83j+7lVcrJHUht6ujZytj/staq/Cesu
	 VammKJdk6XqpwGNgbREQgOv0RoH7G8AQ9hUn7e/1GBBAz5ni9GONB6etw3dHydMcSSvON
	 MDk+vbeZNS2f/FJ8uyOzl7luXv0di+fPy09E3XPywasn7GwSjiUROWuF+Cfn1GjPovZVC
	 UZUeWiOr/LHcLTLaB/8K6URV/BcgRFSUWw2jvAVM3enO0agpGNDrRydY4G3uo4Wq1Eb55
	 XDLEn6c/z6NF4L4zeqwzO+XgNrv+SoJLTPC8a50ay5IZoU8FYlUOSeYssPjVR4xbGvw==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796052161;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:References:
	 In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type;
	bh=DHPdzE0/dY/0wDYRmxWL0Lx6Eo7F7jVbk/NOfI4qwTc=;
	b=hNQn/V3p4COGG5k2vYBIh9zwq7FvUd8YqJ0Yy4dD3Yxoi3m9j3/0lJFVhzmus2+dtd15
	 +nQhU8esHHcsl9FlBOc7L0GfCYXGosFPrXzuWITLXU/RtEHW8cZ987+awRbSkkQ41l85x
	 FNqP0tuNtLjnMay1lD3GlYiEPZiZJJ7SxQd2qp0elu6QYRBX/lTr7JJkyBbf+ZcBJ6R8r
	 XVKGmK2jNwQBpu95EgKl7GM4nHwc2ACeae3GuyRh/tYnDiLdmbraAPbunyzCdPPAO4jM4
	 D4JClbZRVk3kofbEAOxOlvbkvZUTvu/T9Bx7Dw/x9oHyoCCYnKvAavBFTUnsXxROm0w==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ABBvVQP+;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.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 5654E606A336;
	Mon, 30 Nov 2026 15:22:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ABBvVQP+
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=74.125.224.51
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796052160;
	b=Je2Dl7PK17tTNej8bqaZuMJ2Jtv4RX9pbC4LEkh78TKew4+K763jTJtUASnKkvp21fk4
	 qsL+l/peL2Xkv2m8qu+NhMahMfHSVhvbHYXmitXPjlDVTxlbwb9gTaV8N4+HbXXQs2BPk
	 blEzPu+QhE99h5SHws6msfITBNMh9eYtaOJGBWP+v972GKPxLVMnhEOinkP7b2LNZTY82
	 eb3orWJTTTO5JMoVex3milMNRbNOo5T3Wq9PZI9abCgoC7Mzf+AgaWojBMT9gAtjBOh9U
	 aM7Je0gIe3Z3rFTECC+3ExI5JuZhzqZNkBQ9fl8SACiKVvHzCLzia1T23LwyVnMXNBA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796052160;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:MIME-Version:References:
	 In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type;
	bh=DHPdzE0/dY/0wDYRmxWL0Lx6Eo7F7jVbk/NOfI4qwTc=;
	b=eGlbY6ysP0FdrB7OxOXePvqGBeMScB5aWqaJARoZrg0nqM5nxizrHbuJdR/wLxfT+sLC
	 YPSBqO53mgmhEtsixjCZUHpzlV9BTlh5WBgTZ/2scGw4GzG1MEDLpgdhvA3qQtf110GCi
	 7xdXdCHZUJ5XzE9AOgsA2fBxgeZ72/MHdvSxYOshnnTCjzWAkJInLC+Dpzdf+UvdTTdpR
	 5xCHx3LxWZTNrPmRgZYxAWhJcjuuTqHV27JwwYTj9XtFUjRnL8GnzoUd2N09SmOdtBN4/
	 GoESfjfM6kJ9rg5RRsSHQdSRFhjRMsrZrKJPOf8bobTiDkFB+9b/whQKsTmGoVciqiA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ABBvVQP+;
	arc=pass header.oldest-pass=0 smtp.remote-ip=74.125.224.51
X-Received: from mail-yx1-f51.google.com (mail-yx1-f51.google.com [74.125.224.51])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31C43606A32A
	for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 15:22:39 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 31C43606A32A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-yx1-f51.google.com with SMTP id 956f58d0204a3-67be1e468a8so10115195d50.0
        for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 07:22:39 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1796052159; cv=none;
        d=google.com; s=arc-20260327;
        b=deh1VOlLx83N697rTraTu/VaZana0iTaAn1Zla06Zd5qP+oFKnbu7nS6lLUKtRV3/P
         xqqlP4xZEmic3DVPNIcz6ekMqRKLJHDbTUpVWVz3WyNiyybFUzY4FODIt8bNAS43n2hT
         Mmc3YfTXyJV+PKYc+GgEg5zLzgkKQcUBmVrOYRLCntXn3zVs1fxsv4ilZdXDeVglWbFQ
         WeI+WX+22civjEEMBv74HXu2z7izdeaEKfaOGe9ZmNGLbl8h7PoxBWdwdeFXLDuv+8bp
         zzOxfmp15gAEJo8JxGzDWS5oEJU4w1jab1EHmmsIZmOjFpY1aXX1/FaGeBuf+RdX2q0L
         bZMQ==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:dkim-signature;
        bh=DHPdzE0/dY/0wDYRmxWL0Lx6Eo7F7jVbk/NOfI4qwTc=;
        fh=b4ji4Augq4T7fn7+11F/eQ3Urex5J7hU/tH+6EA3kOw=;
        b=cVKYuCeMvgiKS99sV01ynFsv4WmYn3UTlVfILlENwvwWjVfcFYICcBtiORhQst+ZNo
         FChlPZwJunhkqGeNmXvDquf2GJtgtubKBGu7222iC7tI4+k8YZx3jknhvreW1PrrDL9d
         KFOe5t+UIucVpg41cG9EgsQO9p85TezqmB2zt/LQ+INVKmfzHCGQBrjP3/NPnOUEwcCX
         XfaKJAhml9sq/qtaMLK3maOF6Xnnp9uYJBhs289y1kpqg/WA7D5fXKcgJZUK9S2OAeCE
         SrAeGrLndVZKG8oS+budOGIYMEVzKu07b/DkWvpzjMeadAQZjUISkQfidfZ+P3i63Vy0
         0xZQ==;
        darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1796052159; x=1796656959; darn=vger.kernel.org;
        h=content-type:cc:to:subject:message-id:date:from:in-reply-to
         :references:mime-version:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=DHPdzE0/dY/0wDYRmxWL0Lx6Eo7F7jVbk/NOfI4qwTc=;
        b=ABBvVQP+sAHY6QLuRMmUbA9e4TD1HfkpmfrsKKQ4Buod4V/12WL6+h8BRJCGZbxCUO
         +pBn6kVRSCnb4fcQ9iU0obarJuEHVIqINaBZqRDvZqTVwIQIq2w4GclD5H8EFfNqzYOk
         QigBmofDTeY5LtimmyUP5D5Ml4USulzdRE194dXPKJdjUcGBnzDZDe56wzHCvxcQAhja
         7dfHkC1wCHXpv28Ngjtn3d5IXb5RPusmlwgTCa0Vfu1e88dmXwgEYLnSZ1U3WcUqtuOT
         QCNSSVMiQOQmPoGbO7yWtsd49QDn75NY7Jz36X16+9EkEXTmN6a7jjShFkKLFBuER4l7
         nhMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1796052159; x=1796656959;
        h=content-type:cc:to:subject:message-id:date:from:in-reply-to
         :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to:content-type;
        bh=DHPdzE0/dY/0wDYRmxWL0Lx6Eo7F7jVbk/NOfI4qwTc=;
        b=Obkhtt9va9K88VXAQ15lQYZfoqMzklaE4zQTxMsaIyBJAlRRD4/IGhhy1X3cQCh8rn
         SyjRX8PtK8jg+9h7kbYSJbJhrmyCUx+pYXUMUw+W3Nk969tVxpi4MCCzRrIyOXvARK98
         vFcNNy4PaFo9hNHFvkqAyTXmTwN2gItkpLqv0Cf46U8Vb5cG6MalSBo8vwfkJG4+Ml/y
         O3P5FxrlZAadLStHRysWWee2e7/v2YE262RFKrTtghpCtDNSswCFWXBCfSu7oBXlFPDo
         y5a/Gb9MAWUeiSjzRGkButqnR89K1exS8DEHooiyVSVdx2Fy843difN1j/5h6HLnBqjX
         tXqQ==
X-Gm-Message-State: APuU4Z8VYvodjlyK99Ngne0eYQIT9csVM8Lgmzu5nrhgDN7hM/ehZSuG
	QsPD9eZT6jbDGumUwlXW93oliFpHECEgo32/mYsWzqWWSn8AtDqzGzsfNfq7k9kAFHlD6rSsQLA
	RMQ/uYRllaGEacbOlC3UD14h9HzWS4OA9mg==
X-Gm-Gg: AZFdTZe1e1TOTS7vQygEQ/9uBCFzl5wGICYF2YKAt8zw76FAn9tNx/PVEYlNqV0xLUR
	Td0E5No3un8NBFMhM27GyE4rny6KWBys8ZF/G+kF+UGzZDAf58ax6ja7LzkwVHN4AvslePRf8Cr
	BiZOLM9NFay8VYCdXHNEW62Ip35yKuKU3Lx4svWGFfAZKLT8IhH8jKB0b8jA3cGgq974Bajwq1A
	rzTVpTRJicawmhVM2NaciDUIf7pzVCTxS2aanH2wHd/XbSH23zbHysh7JfGgMqfP58LpjvxWBwI
	EqCk1PoGiRgbVKA3EyR3dHPk88wsrOY9zSZFeuaH6cyN0YdXNcc5Nbr5IBoQMFz7sza6gQQr/60
	9Umfa9I3VqqGSsqbS+z3eeo7453LzWJLNCMHN+YMDy2eNHAp5B1NlUhnWM+jyj+5htO/q
X-Received: by 2002:a05:690e:4148:b0:67d:b472:88a8 with SMTP id
 956f58d0204a3-67df4451913mr15364748d50.82.1796052159115; Mon, 30 Nov 2026
 07:22:39 -0800 (PST)
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-In-Reply-To: <CAAnb6FSz3mbTOPmXg3AAq3qJ4NaDxEeG65Jt5K7-aVMiq2_70g@mail.gmail.com>
X-Gm-Features: Aa3M54qvhwu3mUcujMSuCDan3f0W0VXRivB-U3CpIK73Dd7Y-VM3OdBJwWc_4L8
X-Cc: linux-hams@vger.kernel.org, stable@vger.kernel.org