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
53f57fef
Commit
53f57fef
authored
Mar 14, 2016
by
Mike Marshall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Orangefs: Extra sanity insurance on buffer before using string functions on it.
Signed-off-by:
Mike Marshall
<
hubcap@omnibond.com
>
parent
ab665252
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
fs/orangefs/devorangefs-req.c
fs/orangefs/devorangefs-req.c
+13
-0
No files found.
fs/orangefs/devorangefs-req.c
View file @
53f57fef
...
@@ -678,6 +678,19 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg)
...
@@ -678,6 +678,19 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg)
ret
=
copy_from_user
(
&
client_debug_array_string
,
ret
=
copy_from_user
(
&
client_debug_array_string
,
(
void
__user
*
)
arg
,
(
void
__user
*
)
arg
,
ORANGEFS_MAX_DEBUG_STRING_LEN
);
ORANGEFS_MAX_DEBUG_STRING_LEN
);
/*
* The real client-core makes an effort to ensure
* that actual strings that aren't too long to fit in
* this buffer is what we get here. We're going to use
* string functions on the stuff we got, so we'll make
* this extra effort to try and keep from
* flowing out of this buffer when we use the string
* functions, even if somehow the stuff we end up
* with here is garbage.
*/
client_debug_array_string
[
ORANGEFS_MAX_DEBUG_STRING_LEN
-
1
]
=
'\0'
;
if
(
ret
!=
0
)
{
if
(
ret
!=
0
)
{
pr_info
(
"%s: CLIENT_STRING: copy_from_user failed
\n
"
,
pr_info
(
"%s: CLIENT_STRING: copy_from_user failed
\n
"
,
__func__
);
__func__
);
...
...
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