Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
53f57fef
Commit
53f57fef
authored
9 years ago
by
Mike Marshall
Browse files
Options
Downloads
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
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/orangefs/devorangefs-req.c
+13
-0
13 additions, 0 deletions
fs/orangefs/devorangefs-req.c
with
13 additions
and
0 deletions
fs/orangefs/devorangefs-req.c
+
13
−
0
View file @
53f57fef
...
...
@@ -678,6 +678,19 @@ static long dispatch_ioctl_command(unsigned int command, unsigned long arg)
ret
=
copy_from_user
(
&
client_debug_array_string
,
(
void
__user
*
)
arg
,
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
)
{
pr_info
(
"%s: CLIENT_STRING: copy_from_user failed
\n
"
,
__func__
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment