Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
19c8192f
Unverified
Commit
19c8192f
authored
Mar 26, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: prevent UAF in lxc_clear_limits()
Link:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32532
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
2875de4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
conf.c
src/lxc/conf.c
+6
-3
No files found.
src/lxc/conf.c
View file @
19c8192f
...
@@ -3742,7 +3742,7 @@ int lxc_clear_limits(struct lxc_conf *c, const char *key)
...
@@ -3742,7 +3742,7 @@ int lxc_clear_limits(struct lxc_conf *c, const char *key)
else
if
(
strnequal
(
key
,
"lxc.prlimit."
,
STRLITERALLEN
(
"lxc.prlimit."
)))
else
if
(
strnequal
(
key
,
"lxc.prlimit."
,
STRLITERALLEN
(
"lxc.prlimit."
)))
k
=
key
+
STRLITERALLEN
(
"lxc.prlimit."
);
k
=
key
+
STRLITERALLEN
(
"lxc.prlimit."
);
else
else
return
-
1
;
return
ret_errno
(
EINVAL
)
;
lxc_list_for_each_safe
(
it
,
&
c
->
limits
,
next
)
{
lxc_list_for_each_safe
(
it
,
&
c
->
limits
,
next
)
{
struct
lxc_limit
*
lim
=
it
->
elem
;
struct
lxc_limit
*
lim
=
it
->
elem
;
...
@@ -3751,11 +3751,14 @@ int lxc_clear_limits(struct lxc_conf *c, const char *key)
...
@@ -3751,11 +3751,14 @@ int lxc_clear_limits(struct lxc_conf *c, const char *key)
continue
;
continue
;
lxc_list_del
(
it
);
lxc_list_del
(
it
);
free
(
lim
->
resource
);
free_disarm
(
lim
->
resource
);
free
(
lim
);
free
(
lim
);
free
(
it
);
}
}
if
(
all
)
lxc_list_init
(
&
c
->
limits
);
return
0
;
return
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