forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
panic/netfilter/tools: taint buffer, xt match align, litmus #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
staticpayload
wants to merge
3
commits into
master
Choose a base branch
from
pr/existing-20260115
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,37 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| #ifndef _XT_CONNMARK_H_target | ||
| #define _XT_CONNMARK_H_target | ||
| /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| /* Copyright (C) 2002,2004 MARA Systems AB <https://www.marasystems.com> | ||
| * by Henrik Nordstrom <hno@marasystems.com> | ||
| */ | ||
|
|
||
| #include <linux/netfilter/xt_connmark.h> | ||
| #ifndef _XT_CONNMARK_H | ||
| #define _XT_CONNMARK_H | ||
|
|
||
| #endif /*_XT_CONNMARK_H_target*/ | ||
| #include <linux/types.h> | ||
|
|
||
| enum { | ||
| XT_CONNMARK_SET = 0, | ||
| XT_CONNMARK_SAVE, | ||
| XT_CONNMARK_RESTORE | ||
| }; | ||
|
|
||
| enum { | ||
| D_SHIFT_LEFT = 0, | ||
| D_SHIFT_RIGHT, | ||
| }; | ||
|
|
||
| struct xt_connmark_tginfo1 { | ||
| __u32 ctmark, ctmask, nfmask; | ||
| __u8 mode; | ||
| }; | ||
|
|
||
| struct xt_connmark_tginfo2 { | ||
| __u32 ctmark, ctmask, nfmask; | ||
| __u8 shift_dir, shift_bits, mode; | ||
| }; | ||
|
|
||
| struct xt_connmark_mtinfo1 { | ||
| __u32 mark, mask; | ||
| __u8 invert; | ||
| }; | ||
|
|
||
| #endif /*_XT_CONNMARK_H*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,32 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| /* x_tables module for setting the IPv4/IPv6 DSCP field | ||
| /* x_tables module for matching the IPv4/IPv6 DSCP field | ||
| * | ||
| * (C) 2002 Harald Welte <laforge@gnumonks.org> | ||
| * based on ipt_FTOS.c (C) 2000 by Matthew G. Marsh <mgm@paktronix.com> | ||
| * This software is distributed under GNU GPL v2, 1991 | ||
| * | ||
| * See RFC2474 for a description of the DSCP field within the IP Header. | ||
| * | ||
| * xt_DSCP.h,v 1.7 2002/03/14 12:03:13 laforge Exp | ||
| * xt_dscp.h,v 1.3 2002/08/05 19:00:21 laforge Exp | ||
| */ | ||
| #ifndef _XT_DSCP_TARGET_H | ||
| #define _XT_DSCP_TARGET_H | ||
| #include <linux/netfilter/xt_dscp.h> | ||
| #ifndef _XT_DSCP_H | ||
| #define _XT_DSCP_H | ||
|
|
||
| #include <linux/types.h> | ||
|
|
||
| /* target info */ | ||
| struct xt_DSCP_info { | ||
| #define XT_DSCP_MASK 0xfc /* 11111100 */ | ||
| #define XT_DSCP_SHIFT 2 | ||
| #define XT_DSCP_MAX 0x3f /* 00111111 */ | ||
|
|
||
| /* match info */ | ||
| struct xt_dscp_info { | ||
| __u8 dscp; | ||
| __u8 invert; | ||
| }; | ||
|
|
||
| struct xt_tos_target_info { | ||
| __u8 tos_value; | ||
| struct xt_tos_match_info { | ||
| __u8 tos_mask; | ||
| __u8 tos_value; | ||
| __u8 invert; | ||
| }; | ||
|
|
||
| #endif /* _XT_DSCP_TARGET_H */ | ||
| #endif /* _XT_DSCP_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,16 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| #ifndef _XT_MARK_H_target | ||
| #define _XT_MARK_H_target | ||
| #ifndef _XT_MARK_H | ||
| #define _XT_MARK_H | ||
|
|
||
| #include <linux/netfilter/xt_mark.h> | ||
| #include <linux/types.h> | ||
|
|
||
| #endif /*_XT_MARK_H_target */ | ||
| struct xt_mark_tginfo2 { | ||
| __u32 mark, mask; | ||
| }; | ||
|
|
||
| struct xt_mark_mtinfo1 { | ||
| __u32 mark, mask; | ||
| __u8 invert; | ||
| }; | ||
|
|
||
| #endif /*_XT_MARK_H*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,39 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| #ifndef _XT_RATEEST_TARGET_H | ||
| #define _XT_RATEEST_TARGET_H | ||
| #ifndef _XT_RATEEST_MATCH_H | ||
| #define _XT_RATEEST_MATCH_H | ||
|
|
||
| #include <linux/types.h> | ||
| #include <linux/if.h> | ||
|
|
||
| struct xt_rateest_target_info { | ||
| char name[IFNAMSIZ]; | ||
| __s8 interval; | ||
| __u8 ewma_log; | ||
| enum xt_rateest_match_flags { | ||
| XT_RATEEST_MATCH_INVERT = 1<<0, | ||
| XT_RATEEST_MATCH_ABS = 1<<1, | ||
| XT_RATEEST_MATCH_REL = 1<<2, | ||
| XT_RATEEST_MATCH_DELTA = 1<<3, | ||
| XT_RATEEST_MATCH_BPS = 1<<4, | ||
| XT_RATEEST_MATCH_PPS = 1<<5, | ||
| }; | ||
|
|
||
| enum xt_rateest_match_mode { | ||
| XT_RATEEST_MATCH_NONE, | ||
| XT_RATEEST_MATCH_EQ, | ||
| XT_RATEEST_MATCH_LT, | ||
| XT_RATEEST_MATCH_GT, | ||
| }; | ||
|
|
||
| struct xt_rateest_match_info { | ||
| char name1[IFNAMSIZ]; | ||
| char name2[IFNAMSIZ]; | ||
| __u16 flags; | ||
| __u16 mode; | ||
| __u32 bps1; | ||
| __u32 pps1; | ||
| __u32 bps2; | ||
| __u32 pps2; | ||
|
|
||
| /* Used internally by the kernel */ | ||
| struct xt_rateest *est __attribute__((aligned(8))); | ||
| struct xt_rateest *est1 __attribute__((aligned(8))); | ||
| struct xt_rateest *est2 __attribute__((aligned(8))); | ||
| }; | ||
|
|
||
| #endif /* _XT_RATEEST_TARGET_H */ | ||
| #endif /* _XT_RATEEST_MATCH_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,12 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| #ifndef _XT_TCPMSS_H | ||
| #define _XT_TCPMSS_H | ||
| #ifndef _XT_TCPMSS_MATCH_H | ||
| #define _XT_TCPMSS_MATCH_H | ||
|
|
||
| #include <linux/types.h> | ||
|
|
||
| struct xt_tcpmss_info { | ||
| __u16 mss; | ||
| struct xt_tcpmss_match_info { | ||
| __u16 mss_min, mss_max; | ||
| __u8 invert; | ||
| }; | ||
|
|
||
| #define XT_TCPMSS_CLAMP_PMTU 0xffff | ||
|
|
||
| #endif /* _XT_TCPMSS_H */ | ||
| #endif /*_XT_TCPMSS_MATCH_H*/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,16 @@ | ||
| /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| /* Header file for iptables ipt_ECN target | ||
| * | ||
| * (C) 2002 by Harald Welte <laforge@gnumonks.org> | ||
| * | ||
| * This software is distributed under GNU GPL v2, 1991 | ||
| * | ||
| * ipt_ECN.h,v 1.3 2002/05/29 12:17:40 laforge Exp | ||
| */ | ||
| #ifndef _IPT_ECN_TARGET_H | ||
| #define _IPT_ECN_TARGET_H | ||
| #ifndef _IPT_ECN_H | ||
| #define _IPT_ECN_H | ||
|
|
||
| #include <linux/types.h> | ||
| #include <linux/netfilter/xt_DSCP.h> | ||
| #include <linux/netfilter/xt_ecn.h> | ||
| #define ipt_ecn_info xt_ecn_info | ||
|
|
||
| #define IPT_ECN_IP_MASK (~XT_DSCP_MASK) | ||
|
|
||
| #define IPT_ECN_OP_SET_IP 0x01 /* set ECN bits of IPv4 header */ | ||
| #define IPT_ECN_OP_SET_ECE 0x10 /* set ECE bit of TCP header */ | ||
| #define IPT_ECN_OP_SET_CWR 0x20 /* set CWR bit of TCP header */ | ||
|
|
||
| #define IPT_ECN_OP_MASK 0xce | ||
|
|
||
| struct ipt_ECN_info { | ||
| __u8 operation; /* bitset of operations */ | ||
| __u8 ip_ect; /* ECT codepoint of IPv4 header, pre-shifted */ | ||
| union { | ||
| struct { | ||
| __u8 ece:1, cwr:1; /* TCP ECT bits */ | ||
| } tcp; | ||
| } proto; | ||
| enum { | ||
| IPT_ECN_IP_MASK = XT_ECN_IP_MASK, | ||
| IPT_ECN_OP_MATCH_IP = XT_ECN_OP_MATCH_IP, | ||
| IPT_ECN_OP_MATCH_ECE = XT_ECN_OP_MATCH_ECE, | ||
| IPT_ECN_OP_MATCH_CWR = XT_ECN_OP_MATCH_CWR, | ||
| IPT_ECN_OP_MATCH_MASK = XT_ECN_OP_MATCH_MASK, | ||
| }; | ||
|
|
||
| #endif /* _IPT_ECN_TARGET_H */ | ||
| #endif /* IPT_ECN_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation uses spaces instead of tabs.
Linux kernel coding style requires tabs for indentation. This struct uses 4 spaces.
Proposed fix
struct xt_tcpmss_match_info { - __u16 mss_min, mss_max; - __u8 invert; + __u16 mss_min, mss_max; + __u8 invert; };📝 Committable suggestion
🤖 Prompt for AI Agents