File Do-not-continue-with-launch-if-_become_user-fails.patch of Package slurm.15688
From: Harald Barth <haba@kth.se>
Date: Wed Dec 18 20:55:21 2019 -0700
Subject: Do not continue with launch if _become_user() fails.
Patch-mainline: Not yet
Git-commit: 793946fb6a51bf84a7a54c711f38874f9d396e29
References: bsc#1159692,CVE-2019-19728
If this failed, the step would launch as root instead of the desired
user, which could be exploited.
Bug 8084.
CVE-2019-19728.
Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Egbert Eich <eich@suse.com>
---
src/srun/libsrun/srun_job.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/srun/libsrun/srun_job.c b/src/srun/libsrun/srun_job.c
index b607706..109aa40 100644
--- a/src/srun/libsrun/srun_job.c
+++ b/src/srun/libsrun/srun_job.c
@@ -1241,7 +1241,7 @@ extern void create_srun_job(void **p_job, bool *got_alloc,
* Become --uid user
*/
if (_become_user () < 0)
- info("Warning: Unable to assume uid=%u", opt.uid);
+ fatal("Unable to assume uid=%u", opt.uid);
if (_create_job_step(job, true, srun_job_list, pack_jobid,
pack_nodelist) < 0) {
slurm_complete_job(my_job_id, 1);
@@ -1267,7 +1267,7 @@ extern void create_srun_job(void **p_job, bool *got_alloc,
* Become --uid user
*/
if (_become_user () < 0)
- info("Warning: Unable to assume uid=%u", opt.uid);
+ fatal("Unable to assume uid=%u", opt.uid);
if (!slurm_started) {
/*