Skip to content

[ciqcbr7_9] ip6_tunnel: clear skb2->cb[] in ip4ip6_err()#1328

Merged
bmastbergen merged 1 commit into
ciqcbr7_9from
{bmastbergen}_ciqcbr7_9
Jun 11, 2026
Merged

[ciqcbr7_9] ip6_tunnel: clear skb2->cb[] in ip4ip6_err()#1328
bmastbergen merged 1 commit into
ciqcbr7_9from
{bmastbergen}_ciqcbr7_9

Conversation

@ciq-kernel-automation

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

ip6_tunnel: clear skb2->cb[] in ip4ip6_err()

jira VULN-183728
cve CVE-2026-43037
commit-author Eric Dumazet <edumazet@google.com>
commit 2edfa31769a4add828a7e604b21cb82aaaa05925

Test Results

✅ Build Stage

  • Status: Passed (x86_64)

  • Build Time: 13m 26s

  • Total Time: 14m 34s

  • View build logs

✅ Boot Verification


🤖 This PR was automatically generated by GitHub Actions
Run ID: 27351420218

jira VULN-183728
cve CVE-2026-43037
commit-author Eric Dumazet <edumazet@google.com>
commit 2edfa31

Oskar Kjos reported the following problem.

ip4ip6_err() calls icmp_send() on a cloned skb whose cb[] was written
by the IPv6 receive path as struct inet6_skb_parm. icmp_send() passes
IPCB(skb2) to __ip_options_echo(), which interprets that cb[] region
as struct inet_skb_parm (IPv4). The layouts differ: inet6_skb_parm.nhoff
at offset 14 overlaps inet_skb_parm.opt.rr, producing a non-zero rr
value. __ip_options_echo() then reads optlen from attacker-controlled
packet data at sptr[rr+1] and copies that many bytes into dopt->__data,
a fixed 40-byte stack buffer (IP_OPTIONS_DATA_FIXED_SIZE).

To fix this we clear skb2->cb[], as suggested by Oskar Kjos.

Also add minimal IPv4 header validation (version == 4, ihl >= 5).

Fixes: c4d3efa ("[IPV6] IP6TUNNEL: Add support to IPv4 over IPv6 tunnel.")
	Reported-by: Oskar Kjos <oskar.kjos@hotmail.com>
	Signed-off-by: Eric Dumazet <edumazet@google.com>
	Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260326155138.2429480-1-edumazet@google.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 2edfa31)
	Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label Jun 11, 2026
@github-actions

Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/27354001800

@github-actions

Copy link
Copy Markdown

Validation checks completed successfully View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/27354001800

@bmastbergen bmastbergen requested a review from a team June 11, 2026 15:58
@bmastbergen bmastbergen self-requested a review June 11, 2026 16:11

@bmastbergen bmastbergen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@bmastbergen bmastbergen merged commit 8249e8f into ciqcbr7_9 Jun 11, 2026
4 checks passed
@bmastbergen bmastbergen deleted the {bmastbergen}_ciqcbr7_9 branch June 11, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.

2 participants