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
nexedi
linux
Commits
24d696a7
Commit
24d696a7
authored
Apr 22, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cris: missing checks of __get_user()/__put_user() return values
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
43f16819
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
arch/cris/arch-v10/kernel/signal.c
arch/cris/arch-v10/kernel/signal.c
+6
-6
arch/cris/arch-v32/kernel/signal.c
arch/cris/arch-v32/kernel/signal.c
+6
-6
No files found.
arch/cris/arch-v10/kernel/signal.c
View file @
24d696a7
...
...
@@ -65,10 +65,10 @@ int sys_sigaction(int sig, const struct old_sigaction __user *act,
old_sigset_t
mask
;
if
(
!
access_ok
(
VERIFY_READ
,
act
,
sizeof
(
*
act
))
||
__get_user
(
new_ka
.
sa
.
sa_handler
,
&
act
->
sa_handler
)
||
__get_user
(
new_ka
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
))
__get_user
(
new_ka
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
)
||
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
)
||
__get_user
(
mask
,
&
act
->
sa_mask
))
return
-
EFAULT
;
__get_user
(
new_ka
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
__get_user
(
mask
,
&
act
->
sa_mask
);
siginitset
(
&
new_ka
.
sa
.
sa_mask
,
mask
);
}
...
...
@@ -77,10 +77,10 @@ int sys_sigaction(int sig, const struct old_sigaction __user *act,
if
(
!
ret
&&
oact
)
{
if
(
!
access_ok
(
VERIFY_WRITE
,
oact
,
sizeof
(
*
oact
))
||
__put_user
(
old_ka
.
sa
.
sa_handler
,
&
oact
->
sa_handler
)
||
__put_user
(
old_ka
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
))
__put_user
(
old_ka
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
)
||
__put_user
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
)
||
__put_user
(
old_ka
.
sa
.
sa_mask
.
sig
[
0
],
&
oact
->
sa_mask
))
return
-
EFAULT
;
__put_user
(
old_ka
.
sa
.
sa_flags
,
&
oact
->
sa_flags
);
__put_user
(
old_ka
.
sa
.
sa_mask
.
sig
[
0
],
&
oact
->
sa_mask
);
}
return
ret
;
...
...
arch/cris/arch-v32/kernel/signal.c
View file @
24d696a7
...
...
@@ -79,11 +79,11 @@ sys_sigaction(int signal, const struct old_sigaction *act,
if
(
!
access_ok
(
VERIFY_READ
,
act
,
sizeof
(
*
act
))
||
__get_user
(
newk
.
sa
.
sa_handler
,
&
act
->
sa_handler
)
||
__get_user
(
newk
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
))
__get_user
(
newk
.
sa
.
sa_restorer
,
&
act
->
sa_restorer
)
||
__get_user
(
newk
.
sa
.
sa_flags
,
&
act
->
sa_flags
)
||
__get_user
(
mask
,
&
act
->
sa_mask
))
return
-
EFAULT
;
__get_user
(
newk
.
sa
.
sa_flags
,
&
act
->
sa_flags
);
__get_user
(
mask
,
&
act
->
sa_mask
);
siginitset
(
&
newk
.
sa
.
sa_mask
,
mask
);
}
...
...
@@ -92,11 +92,11 @@ sys_sigaction(int signal, const struct old_sigaction *act,
if
(
!
retval
&&
oact
)
{
if
(
!
access_ok
(
VERIFY_WRITE
,
oact
,
sizeof
(
*
oact
))
||
__put_user
(
oldk
.
sa
.
sa_handler
,
&
oact
->
sa_handler
)
||
__put_user
(
oldk
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
))
__put_user
(
oldk
.
sa
.
sa_restorer
,
&
oact
->
sa_restorer
)
||
__put_user
(
oldk
.
sa
.
sa_flags
,
&
oact
->
sa_flags
)
||
__put_user
(
oldk
.
sa
.
sa_mask
.
sig
[
0
],
&
oact
->
sa_mask
))
return
-
EFAULT
;
__put_user
(
oldk
.
sa
.
sa_flags
,
&
oact
->
sa_flags
);
__put_user
(
oldk
.
sa
.
sa_mask
.
sig
[
0
],
&
oact
->
sa_mask
);
}
return
retval
;
...
...
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