🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Tristan Madani Fri, 23 Oct 2026 19:53
[PATCH net] ppp: fix stale pointer access after pskb_may_pull in ppp_ccp_peek
#6913
Author: Tristan Madani
Date: Fri, 23 Oct 2026 19:53
35 lines
11796 bytes
From: Tristan Madani <tristan@talencesecurity.com>

ppp_ccp_peek() caches a pointer to skb->data in dp after the first
pskb_may_pull(), then uses dp after a second pskb_may_pull(skb, len + 2)
in the CCP_CONFACK handler. If the second pull triggers
pskb_expand_head() due to a cloned skb or frag linearization,
skb->head is freed and reallocated, leaving dp stale.

The stale dp is subsequently used in CCP_OPT_LENGTH() and passed to
decomp_init()/comp_init() which read from the freed memory.

Re-derive dp from skb->data after the second pskb_may_pull.

Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
 drivers/net/ppp/ppp_generic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 1a610a18893ba..3998ce4332f42 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -3157,6 +3157,7 @@ ppp_ccp_peek(struct ppp *ppp, struct sk_buff *skb, int inbound)
 		len = CCP_LENGTH(dp);
 		if (!pskb_may_pull(skb, len + 2))
 			return;		/* too short */
+		dp = skb->data + 2;
 		dp += CCP_HDRLEN;
 		len -= CCP_HDRLEN;
 		if (len < CCP_OPT_MINLEN || len < CCP_OPT_LENGTH(dp))
-- 
2.47.3
Re: [PATCH net] ppp: fix stale pointer access after pskb_may_pull in ppp_ccp_peek
#6918
Author: netdev-bot+sinfo
Date: Fri, 23 Oct 2026 19:55
22 lines
8783 bytes
Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - 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.
Re: [PATCH net] ppp: fix stale pointer access after pskb_may_pull in ppp_ccp_peek
#8180
Author: patchwork-bot+netdevbpf
Date: Wed, 28 Oct 2026 10:02
25 lines
8761 bytes
Hello:

This patch was applied to netdev/net.git (main)
by Dave Miller <davem@davem-thinkpadp1gen8.ibmlond.csb>:

On Fri, 23 Oct 2026 19:53:09 +0000 you wrote:
> From: Tristan Madani <tristan@talencesecurity.com>
> 
> ppp_ccp_peek() caches a pointer to skb->data in dp after the first
> pskb_may_pull(), then uses dp after a second pskb_may_pull(skb, len + 2)
> in the CCP_CONFACK handler. If the second pull triggers
> pskb_expand_head() due to a cloned skb or frag linearization,
> skb->head is freed and reallocated, leaving dp stale.
> 
> [...]

Here is the summary with links:
  - [net] ppp: fix stale pointer access after pskb_may_pull in ppp_ccp_peek
    https://git.kernel.org/netdev/net/c/1e860f42f41c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads