Skip to content

Fix panic in iptables UserChainTarget.Action(). - #13992

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test/cl959207671
Aug 5, 2026
Merged

Fix panic in iptables UserChainTarget.Action().#13992
copybara-service[bot] merged 1 commit into
masterfrom
test/cl959207671

Conversation

@copybara-service

Copy link
Copy Markdown

Fix panic in iptables UserChainTarget.Action().

Prior to this CL, we assumed that execution would never fall through to
UserChainTargets, because every chain ends with an unconditional RETURN or
policy rule. This is not true with setsockopt(IP6T_SO_SET_REPLACE), with which
a userspace program can supply an arbitrary table layout.

Linux already rejects such tables, and so now we do too. Additionally, such
failures in Linux are handled by just calling ipt_error which logs an error
message instead of panicking, so replacing our panic with a BugTracebackOnce
makes sense as well. This traceback isn't triggered, but it's here just for
future-proofing.

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Aug 4, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl959207671 branch 5 times, most recently from b6dd0e9 to 7b06d2d Compare August 5, 2026 21:22
Prior to this CL, we assumed that execution would never fall through to
UserChainTargets, because every chain ends with an unconditional RETURN or
policy rule. This is not true with setsockopt(IP6T_SO_SET_REPLACE), with which
a userspace program can supply an arbitrary table layout.

Linux already rejects such tables, and so now we do too. Additionally, such
failures in Linux are handled by just calling ipt_error which logs an error
message instead of panicking, so replacing our panic with a BugTracebackOnce
makes sense as well. This traceback isn't triggered, but it's here just for
future-proofing.

PiperOrigin-RevId: 959886702
@copybara-service
copybara-service Bot merged commit 9d9b068 into master Aug 5, 2026
0 of 2 checks passed
@copybara-service
copybara-service Bot deleted the test/cl959207671 branch August 5, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant