* [PATCH net] ppp: linearize bridged packets when required
@ 2026-10-21 2:36 Qingfang Deng
2026-10-21 2:39 ` netdev-bot+sinfo
0 siblings, 1 reply; 3+ messages in thread
From: Qingfang Deng @ 2026-10-21 2:36 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Qingfang Deng, Breno Leitao, Kees Cook, Taegu Ha,
Tom Parkin, linux-ppp, netdev, linux-kernel
Cc: James Chapman, Sashiko
PPP channel bridging is commonly used for PPPoE relaying or forwarding
from PPPoE to PPPoL2TP. Both destination channel types handle non-linear
packets, but other channels, such as PPP Async, require linear packets.
Ethernet drivers can pass non-linear packets to PPPoE. If one is bridged
to PPP Async, ppp_async_encode() accesses the entire packet through
skb->data, assuming that it is linear. This can read beyond the linear
buffer and transmit unrelated memory over the serial interface.
The normal PPP transmit path in ppp_push() linearizes packets before
passing them to channels without direct_xmit. Apply the same rule in
ppp_channel_bridge_input(), and drop the packet if linearization fails.
Fixes: 4cf476ced45d ("ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260908072135.877364-1-qingfang.deng@linux.dev
Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
drivers/net/ppp/ppp_generic.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 1a610a18893b..a84618e24d61 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -2299,6 +2299,11 @@ static bool ppp_channel_bridge_input(struct channel *pch, struct sk_buff *skb)
goto outl;
}
+ if (!pchb->chan->direct_xmit && skb_linearize(skb)) {
+ kfree_skb(skb);
+ goto outl;
+ }
+
skb_scrub_packet(skb, !net_eq(pch->chan_net, pchb->chan_net));
if (!pchb->chan->ops->start_xmit(pchb->chan, skb))
kfree_skb(skb);
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] ppp: linearize bridged packets when required
2026-10-21 2:36 [PATCH net] ppp: linearize bridged packets when required Qingfang Deng
@ 2026-10-21 2:39 ` netdev-bot+sinfo
2026-10-21 3:07 ` Qingfang Deng
0 siblings, 1 reply; 3+ messages in thread
From: netdev-bot+sinfo @ 2026-10-21 2:39 UTC (permalink / raw)
To: Qingfang Deng
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Breno Leitao, Kees Cook, Taegu Ha, Tom Parkin,
linux-ppp, netdev, linux-kernel, James Chapman, Sashiko
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by code inspection). If it was triggered please include
the symptoms, like the stack trace or error messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] ppp: linearize bridged packets when required
2026-10-21 2:39 ` netdev-bot+sinfo
@ 2026-10-21 3:07 ` Qingfang Deng
0 siblings, 0 replies; 3+ messages in thread
From: Qingfang Deng @ 2026-10-21 3:07 UTC (permalink / raw)
To: netdev-bot+sinfo
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Breno Leitao, Kees Cook, Taegu Ha, Tom Parkin,
linux-ppp, netdev, linux-kernel, James Chapman, Sashiko
On 2026/10/21 10:39, netdev-bot+sinfo@kernel.org wrote:
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by code inspection). If it was triggered please include
> the symptoms, like the stack trace or error messages.
This is reproduced in a VM, with a TAP interface bridged to a PTY. When
IFF_NAPI_FRAGS is set, a non-linear skb is passed to PPPoE and then to
ppp_async_send() without linearization. The packet sent to the PTY then
contains garbage data.
>
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account. If the series needs another revision for
> other reasons, please include the information in the commit messages
> then.
>
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-21 3:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 2:36 [PATCH net] ppp: linearize bridged packets when required Qingfang Deng
2026-10-21 2:39 ` netdev-bot+sinfo
2026-10-21 3:07 ` Qingfang Deng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®