Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1fbe8eb8
Commit
1fbe8eb8
authored
Feb 16, 2004
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETFILTER]: Fix signedness overflow in ip{,6}_tables.c
Bug discovered by Olaf Kirch.
parent
9dc49036
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ip_tables.c
+10
-5
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6_tables.c
+2
-1
No files found.
net/ipv4/netfilter/ip_tables.c
View file @
1fbe8eb8
...
...
@@ -1529,11 +1529,16 @@ tcp_match(const struct sk_buff *skb,
==
tcpinfo
->
flg_cmp
,
IPT_TCP_INV_FLAGS
))
return
0
;
if
(
tcpinfo
->
option
&&
!
tcp_find_option
(
tcpinfo
->
option
,
skb
,
tcph
.
doff
*
4
-
sizeof
(
tcph
),
if
(
tcpinfo
->
option
)
{
if
(
tcph
.
doff
*
4
<
sizeof
(
tcph
))
{
*
hotdrop
=
1
;
return
0
;
}
if
(
!
tcp_find_option
(
tcpinfo
->
option
,
skb
,
tcph
.
doff
*
4
-
sizeof
(
tcph
),
tcpinfo
->
invflags
&
IPT_TCP_INV_OPTION
,
hotdrop
))
return
0
;
}
return
1
;
}
...
...
net/ipv6/netfilter/ip6_tables.c
View file @
1fbe8eb8
...
...
@@ -1545,7 +1545,8 @@ tcp_find_option(u_int8_t option,
duprintf
(
"tcp_match: finding option
\n
"
);
/* If we don't have the whole header, drop packet. */
if
(
tcp
->
doff
*
4
>
datalen
)
{
if
(
tcp
->
doff
*
4
<
sizeof
(
struct
tcphdr
)
||
tcp
->
doff
*
4
>
datalen
)
{
*
hotdrop
=
1
;
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment