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
1cca41e2
Commit
1cca41e2
authored
Oct 29, 2003
by
Herbert Xu
Committed by
David S. Miller
Oct 29, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC]: Missing NULL algorithm checks in AH and IPCOMP init.
parent
b069904a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
net/ipv4/ah4.c
net/ipv4/ah4.c
+3
-0
net/ipv4/ipcomp.c
net/ipv4/ipcomp.c
+6
-1
net/ipv6/ah6.c
net/ipv6/ah6.c
+3
-0
net/ipv6/ipcomp6.c
net/ipv6/ipcomp6.c
+6
-1
No files found.
net/ipv4/ah4.c
View file @
1cca41e2
...
...
@@ -245,6 +245,9 @@ static int ah_init_state(struct xfrm_state *x, void *args)
struct
ah_data
*
ahp
=
NULL
;
struct
xfrm_algo_desc
*
aalg_desc
;
if
(
!
x
->
aalg
)
goto
error
;
/* null auth can use a zero length key */
if
(
x
->
aalg
->
alg_key_len
>
512
)
goto
error
;
...
...
net/ipv4/ipcomp.c
View file @
1cca41e2
...
...
@@ -344,10 +344,15 @@ static void ipcomp_destroy(struct xfrm_state *x)
static
int
ipcomp_init_state
(
struct
xfrm_state
*
x
,
void
*
args
)
{
int
err
=
-
ENOMEM
;
int
err
;
struct
ipcomp_data
*
ipcd
;
struct
xfrm_algo_desc
*
calg_desc
;
err
=
-
EINVAL
;
if
(
!
x
->
calg
)
goto
out
;
err
=
-
ENOMEM
;
ipcd
=
kmalloc
(
sizeof
(
*
ipcd
),
GFP_KERNEL
);
if
(
!
ipcd
)
goto
error
;
...
...
net/ipv6/ah6.c
View file @
1cca41e2
...
...
@@ -380,6 +380,9 @@ static int ah6_init_state(struct xfrm_state *x, void *args)
struct
ah_data
*
ahp
=
NULL
;
struct
xfrm_algo_desc
*
aalg_desc
;
if
(
!
x
->
aalg
)
goto
error
;
/* null auth can use a zero length key */
if
(
x
->
aalg
->
alg_key_len
>
512
)
goto
error
;
...
...
net/ipv6/ipcomp6.c
View file @
1cca41e2
...
...
@@ -276,10 +276,15 @@ static void ipcomp6_destroy(struct xfrm_state *x)
static
int
ipcomp6_init_state
(
struct
xfrm_state
*
x
,
void
*
args
)
{
int
err
=
-
ENOMEM
;
int
err
;
struct
ipcomp_data
*
ipcd
;
struct
xfrm_algo_desc
*
calg_desc
;
err
=
-
EINVAL
;
if
(
!
x
->
calg
)
goto
out
;
err
=
-
ENOMEM
;
ipcd
=
kmalloc
(
sizeof
(
*
ipcd
),
GFP_KERNEL
);
if
(
!
ipcd
)
goto
error
;
...
...
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