From: Andrew Lunn <andrew@lunn.ch>
To: Ashutosh Desai <ashutoshdesai993@gmail.com>
Cc: netdev@vger.kernel.org, linux-hams@vger.kernel.org,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: rose: use pskb_may_pull() in CLEAR_REQUEST length check
Date: Mon, 20 Apr 2026 15:04:30 +0200 [thread overview]
Message-ID: <48f45bdb-6edf-4676-a96e-4530634cd7c0@lunn.ch> (raw)
In-Reply-To: <20260420015723.462479-1-ashutoshdesai993@gmail.com>
On Mon, Apr 20, 2026 at 01:57:23AM +0000, Ashutosh Desai wrote:
> Commit 2835750dd647 ("net: rose: reject truncated CLEAR_REQUEST frames
> in state machines") guards against short CLEAR_REQUEST frames using a
> plain skb->len comparison. Use pskb_may_pull() instead, which both
> enforces the length requirement and ensures the bytes are in the linear
> part of the skb, making the subsequent accesses to skb->data[3] and
> skb->data[4] safe for non-linear buffers.
Did you review all the other comparisons on skb->len in rose?
rose_route.c- if (frametype == ROSE_CALL_REQUEST &&
rose_route.c: (skb->len <= ROSE_CALL_REQ_FACILITIES_OFF ||
rose_route.c- skb->data[ROSE_CALL_REQ_ADDR_LEN_OFF] !=
rose_route.c- ROSE_CALL_REQ_ADDR_LEN_VAL))
rose_loopback.c- if (frametype == ROSE_CALL_REQUEST &&
rose_loopback.c: (skb->len <= ROSE_CALL_REQ_FACILITIES_OFF ||
rose_loopback.c- skb->data[ROSE_CALL_REQ_ADDR_LEN_OFF] !=
Do these need the same fix? Are there other places non linear buffers
should be considered?
Andrew
next prev parent reply other threads:[~2026-04-20 13:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 1:57 [PATCH] net: rose: use pskb_may_pull() in CLEAR_REQUEST length check Ashutosh Desai
2026-04-20 13:04 ` Andrew Lunn [this message]
2026-04-21 2:27 ` Ashutosh Desai
2026-04-21 2:50 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48f45bdb-6edf-4676-a96e-4530634cd7c0@lunn.ch \
--to=andrew@lunn.ch \
--cc=ashutoshdesai993@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-hams@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox