Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
351669e7
Commit
351669e7
authored
2 years ago
by
Dominik Bartkiewicz
Committed by
Tim Wickberg
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Correctly validate io keys.
CVE-2022-29502
parent
ef62acfd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
NEWS
+1
-0
1 addition, 0 deletions
NEWS
src/api/step_io.c
+1
-1
1 addition, 1 deletion
src/api/step_io.c
src/common/io_hdr.c
+8
-4
8 additions, 4 deletions
src/common/io_hdr.c
src/common/io_hdr.h
+1
-1
1 addition, 1 deletion
src/common/io_hdr.h
with
11 additions
and
6 deletions
NEWS
+
1
−
0
View file @
351669e7
...
...
@@ -15,6 +15,7 @@ documents those changes that are of interest to users and administrators.
-- Ignore power_down request when node is already powering down.
-- CVE-2022-29500 - Prevent credential abuse.
-- CVE-2022-29501 - Prevent abuse of REQUEST_FORWARD_DATA.
-- CVE-2022-29502 - Correctly validate io keys.
* Changes in Slurm 21.08.7
==========================
...
...
This diff is collapsed.
Click to expand it.
src/api/step_io.c
+
1
−
1
View file @
351669e7
...
...
@@ -834,7 +834,7 @@ static int _read_io_init_msg(int fd, client_io_t *cio, slurm_addr_t *host)
error
(
"failed reading io init message"
);
goto
fail
;
}
if
(
io_init_msg_validate
(
&
msg
,
cio
->
io_key
)
<
0
)
{
if
(
io_init_msg_validate
(
&
msg
,
cio
->
io_key
,
cio
->
io_key_len
)
<
0
)
{
goto
fail
;
}
if
(
msg
.
nodeid
>=
cio
->
num_nodes
)
{
...
...
This diff is collapsed.
Click to expand it.
src/common/io_hdr.c
+
8
−
4
View file @
351669e7
...
...
@@ -131,7 +131,8 @@ fail:
return
n
;
}
extern
int
io_init_msg_validate
(
io_init_msg_t
*
msg
,
const
char
*
sig
)
extern
int
io_init_msg_validate
(
io_init_msg_t
*
msg
,
const
char
*
sig
,
uint32_t
sig_len
)
{
debug2
(
"Entering io_init_msg_validate"
);
...
...
@@ -144,7 +145,8 @@ extern int io_init_msg_validate(io_init_msg_t *msg, const char *sig)
return
SLURM_ERROR
;
}
if
(
memcmp
((
void
*
)
sig
,
(
void
*
)
msg
->
io_key
,
msg
->
io_key_len
))
{
if
(
msg
->
io_key_len
!=
sig_len
||
memcmp
((
void
*
)
sig
,
(
void
*
)
msg
->
io_key
,
msg
->
io_key_len
))
{
error
(
"Invalid IO init header signature"
);
return
SLURM_ERROR
;
}
...
...
@@ -243,6 +245,7 @@ extern int io_init_msg_read_from_fd(int fd, io_init_msg_t *msg)
{
buf_t
*
buf
=
NULL
;
uint32_t
len
;
int
rc
;
xassert
(
msg
);
...
...
@@ -257,11 +260,12 @@ extern int io_init_msg_read_from_fd(int fd, io_init_msg_t *msg)
buf
=
init_buf
(
len
);
safe_read
(
fd
,
buf
->
head
,
len
);
io_init_msg_unpack
(
msg
,
buf
);
if
((
rc
=
io_init_msg_unpack
(
msg
,
buf
)))
error
(
"%s: io_init_msg_unpack failed: rc=%d"
,
__func__
,
rc
);
free_buf
(
buf
);
debug2
(
"Leaving %s"
,
__func__
);
return
SLURM_SUCCESS
;
return
rc
;
rwfail:
free_buf
(
buf
);
...
...
This diff is collapsed.
Click to expand it.
src/common/io_hdr.h
+
1
−
1
View file @
351669e7
...
...
@@ -87,7 +87,7 @@ int io_hdr_read_fd(int fd, io_hdr_t *hdr);
/*
* Validate io init msg
*/
int
io_init_msg_validate
(
io_init_msg_t
*
msg
,
const
char
*
sig
);
int
io_init_msg_validate
(
io_init_msg_t
*
msg
,
const
char
*
sig
,
uint32_t
sig_len
);
int
io_init_msg_write_to_fd
(
int
fd
,
io_init_msg_t
*
msg
);
int
io_init_msg_read_from_fd
(
int
fd
,
io_init_msg_t
*
msg
);
...
...
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