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
b952a29d
Commit
b952a29d
authored
Mar 19, 2003
by
James Morris
Committed by
David S. Miller
Mar 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC]: fix skb leak in ah and esp.
parent
06d7822a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
net/ipv4/ah.c
net/ipv4/ah.c
+4
-2
net/ipv4/esp.c
net/ipv4/esp.c
+4
-2
net/ipv6/ah6.c
net/ipv6/ah6.c
+5
-3
net/ipv6/esp6.c
net/ipv6/esp6.c
+5
-3
No files found.
net/ipv4/ah.c
View file @
b952a29d
...
...
@@ -68,8 +68,10 @@ static int ah_output(struct sk_buff *skb)
char
buf
[
60
];
}
tmp_iph
;
if
(
skb
->
ip_summed
==
CHECKSUM_HW
&&
skb_checksum_help
(
skb
)
==
NULL
)
return
-
EINVAL
;
if
(
skb
->
ip_summed
==
CHECKSUM_HW
&&
skb_checksum_help
(
skb
)
==
NULL
)
{
err
=
-
EINVAL
;
goto
error_nolock
;
}
spin_lock_bh
(
&
x
->
lock
);
if
((
err
=
xfrm_state_check_expire
(
x
))
!=
0
)
...
...
net/ipv4/esp.c
View file @
b952a29d
...
...
@@ -32,8 +32,10 @@ int esp_output(struct sk_buff *skb)
}
tmp_iph
;
/* First, if the skb is not checksummed, complete checksum. */
if
(
skb
->
ip_summed
==
CHECKSUM_HW
&&
skb_checksum_help
(
skb
)
==
NULL
)
return
-
EINVAL
;
if
(
skb
->
ip_summed
==
CHECKSUM_HW
&&
skb_checksum_help
(
skb
)
==
NULL
)
{
err
=
-
EINVAL
;
goto
error_nolock
;
}
spin_lock_bh
(
&
x
->
lock
);
if
((
err
=
xfrm_state_check_expire
(
x
))
!=
0
)
...
...
net/ipv6/ah6.c
View file @
b952a29d
...
...
@@ -60,9 +60,11 @@ int ah6_output(struct sk_buff *skb)
struct
ah_data
*
ahp
;
u16
nh_offset
=
0
;
u8
nexthdr
;
printk
(
KERN_DEBUG
"%s
\n
"
,
__FUNCTION__
);
if
(
skb
->
ip_summed
==
CHECKSUM_HW
&&
skb_checksum_help
(
skb
)
==
NULL
)
return
-
EINVAL
;
if
(
skb
->
ip_summed
==
CHECKSUM_HW
&&
skb_checksum_help
(
skb
)
==
NULL
)
{
err
=
-
EINVAL
;
goto
error_nolock
;
}
spin_lock_bh
(
&
x
->
lock
);
if
((
err
=
xfrm_state_check_expire
(
x
))
!=
0
)
...
...
net/ipv6/esp6.c
View file @
b952a29d
...
...
@@ -118,10 +118,12 @@ int esp6_output(struct sk_buff *skb)
int
alen
;
int
nfrags
;
u8
nexthdr
;
printk
(
KERN_DEBUG
"%s
\n
"
,
__FUNCTION__
);
/* First, if the skb is not checksummed, complete checksum. */
if
(
skb
->
ip_summed
==
CHECKSUM_HW
&&
skb_checksum_help
(
skb
)
==
NULL
)
return
-
EINVAL
;
if
(
skb
->
ip_summed
==
CHECKSUM_HW
&&
skb_checksum_help
(
skb
)
==
NULL
)
{
err
=
-
EINVAL
;
goto
error_nolock
;
}
spin_lock_bh
(
&
x
->
lock
);
if
((
err
=
xfrm_state_check_expire
(
x
))
!=
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