Bug 1186024 (CVE-2021-31215) - [Slurm] VUL-0: CVE-2021-31215: slurm_20_11,slurm,slurmlibs,slurm_20_02,slurm_18_08: SchedMD Slurm allows remote code execution as SlurmUser
Summary: [Slurm] VUL-0: CVE-2021-31215: slurm_20_11,slurm,slurmlibs,slurm_20_02,slurm_...
Status: RESOLVED FIXED
Alias: CVE-2021-31215
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Christian Goll
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/284215/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-31215:8.6:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-13 13:35 UTC by Gianluca Gabrielli
Modified: 2023-09-11 12:12 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gianluca Gabrielli 2021-05-13 13:35:34 UTC
CVE-2021-31215

SchedMD Slurm before 20.02.7 and 20.03.x through 20.11.x before 20.11.7 allows
remote code execution as SlurmUser because use of a PrologSlurmctld or
EpilogSlurmctld script leads to environment mishandling.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-31215
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-31215
https://lists.schedmd.com/pipermail/slurm-announce/2021/000055.html
https://www.schedmd.com/news.php?id=248#OPT_248
Comment 1 Gianluca Gabrielli 2021-05-13 13:38:52 UTC
Affected packages:

- SUSE:SLE-12-SP2:GA:Products:Update/slurm_20_02  N/A
- SUSE:SLE-15-SP1:Update/slurm_20_02      N/A
- SUSE:SLE-12-SP2:GA:Products:Update/slurm_20_11  N/A
- SUSE:SLE-15-SP1:Update/slurm_20_11      N/A
- SUSE:SLE-15-SP2:Update/slurm_20_11      N/A
- SUSE:SLE-15-SP2:Update/slurm    20.02.6
- SUSE:SLE-15-SP3:Update/slurm    20.11.5
- openSUSE:Factory/slurm  20.11.5

Upstream patch [0].

[0] https://github.com/SchedMD/slurm/commit/a9e9e2fedbd200ca545ab67dd753bd52c919f236.patch
Comment 2 Gianluca Gabrielli 2021-05-13 13:42:50 UTC
I'm not sure, but I guess the following packages could be affected as well, but the vulnerable code is in a different location: src/slurmctld/job_scheduler.c

- SUSE:SLE-12-SP2:GA:Products:Update/slurm
- SUSE:SLE-15:Update/slurm
- SUSE:SLE-12-SP2:GA:Products:Update/slurm_18_08
- SUSE:SLE-15:Update/slurm_18_08
- SUSE:SLE-12-SP2:GA:Products:Update/slurmlibs

Can you, as maintainer of this package, confirm that?

Thanks
Comment 3 Christian Goll 2021-05-14 09:40:21 UTC
The default configuration which we deliver starting with 18_08 is not vulnerable as the Prolog and Epilog options are not set.
Still this options could have been changed by the customer or inherited by the 17.02 default configuration.
Customers should disable them until a fix is delivered.
Comment 4 OBSbugzilla Bot 2021-05-14 11:10:04 UTC
This is an autogenerated message for OBS integration:
This bug (1186024) was mentioned in
https://build.opensuse.org/request/show/893087 Factory / slurm
Comment 7 Gianluca Gabrielli 2021-05-19 10:44:28 UTC
Hi Christian,

(In reply to Christian Goll from comment #3)
> The default configuration which we deliver starting with 18_08 is not
> vulnerable as the Prolog and Epilog options are not set.
> Still this options could have been changed by the customer or inherited by
> the 17.02 default configuration.
> Customers should disable them until a fix is delivered.

If I've not misunderstood, you're confirming the following packages contains the affected code, which it won't be triggered thanks to out default configuration.

- SUSE:SLE-12-SP2:GA:Products:Update/slurm_20_02
- SUSE:SLE-15-SP1:Update/slurm_20_02
- SUSE:SLE-12-SP2:GA:Products:Update/slurm_20_11
- SUSE:SLE-15-SP1:Update/slurm_20_11
- SUSE:SLE-15-SP2:Update/slurm_20_11
- SUSE:SLE-15-SP2:Update/slurm
- SUSE:SLE-15-SP3:Update/slurm
- openSUSE:Factory/slurm
- SUSE:SLE-12-SP2:GA:Products:Update/slurm_18_08
- SUSE:SLE-15:Update/slurm_18_08

Could you share your opinion regarding the following packages:

- SUSE:SLE-12-SP2:GA:Products:Update/slurm       v.17.02.11
- SUSE:SLE-15:Update/slurm                       v.17.11.13
- SUSE:SLE-12-SP2:GA:Products:Update/slurmlibs   v.16.05.8.1

We need all the packages to be patched, because (as you already pointed out) the default configuration can be changed by our customers.

Thanks for your input.
Comment 8 Christian Goll 2021-05-19 14:59:52 UTC
(In reply to Gianluca Gabrielli from comment #7)
> Hi Christian,
> 
> (In reply to Christian Goll from comment #3)
> > The default configuration which we deliver starting with 18_08 is not
> > vulnerable as the Prolog and Epilog options are not set.
> > Still this options could have been changed by the customer or inherited by
> > the 17.02 default configuration.
> > Customers should disable them until a fix is delivered.
> 
> If I've not misunderstood, you're confirming the following packages contains
> the affected code, which it won't be triggered thanks to out default
> configuration.
> 
> - SUSE:SLE-12-SP2:GA:Products:Update/slurm_20_02
> - SUSE:SLE-15-SP1:Update/slurm_20_02
> - SUSE:SLE-12-SP2:GA:Products:Update/slurm_20_11
> - SUSE:SLE-15-SP1:Update/slurm_20_11
> - SUSE:SLE-15-SP2:Update/slurm_20_11
> - SUSE:SLE-15-SP2:Update/slurm
> - SUSE:SLE-15-SP3:Update/slurm
> - openSUSE:Factory/slurm
> - SUSE:SLE-12-SP2:GA:Products:Update/slurm_18_08
> - SUSE:SLE-15:Update/slurm_18_08
> 
> Could you share your opinion regarding the following packages:
> 
> - SUSE:SLE-12-SP2:GA:Products:Update/slurm       v.17.02.11
> - SUSE:SLE-15:Update/slurm                       v.17.11.13
> - SUSE:SLE-12-SP2:GA:Products:Update/slurmlibs   v.16.05.8.1
> 
> We need all the packages to be patched, because (as you already pointed out)
> the default configuration can be changed by our customers.
> 
> Thanks for your input.

With more research on this topic I think the impact is low, as one have run a vulnerable script with the option SlurmctldProlog or SlurmctldEpilog. The patch wich fixes this issue also leads to the suggestion that one also have to use a so called spank plugin which manipulates the environments variable for the SlurmctldProlog or SlurmctldEpilog script. 
I still have to find out, if the v17 and v16 are really vulnerable or not. Still the overall attack surface seems to be low, from my point of view, but I will try to fix these packages.
Comment 10 Swamp Workflow Management 2021-05-27 19:17:42 UTC
SUSE-SU-2021:1791-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (important)
Bug References: 1180700,1185603,1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for HPC 12 (src):    slurm_20_11-20.11.7-3.8.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Swamp Workflow Management 2021-05-27 19:18:54 UTC
SUSE-SU-2021:1793-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (important)
Bug References: 1180700,1185603,1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    slurm_20_11-20.11.7-3.11.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    slurm_20_11-20.11.7-3.11.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Swamp Workflow Management 2021-05-27 19:19:57 UTC
SUSE-SU-2021:1789-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for HPC 12 (src):    slurm_20_02-20.02.7-3.11.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 13 Swamp Workflow Management 2021-05-27 19:22:34 UTC
SUSE-SU-2021:1787-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for HPC 12 (src):    slurm-17.02.11-6.50.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 14 Swamp Workflow Management 2021-05-27 19:26:50 UTC
SUSE-SU-2021:1790-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    slurm_20_02-20.02.7-3.19.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    slurm_20_02-20.02.7-3.19.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 15 Swamp Workflow Management 2021-05-27 19:30:34 UTC
SUSE-SU-2021:1788-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for HPC 12 (src):    slurm_18_08-18.08.9-3.14.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 16 Swamp Workflow Management 2021-05-31 19:21:54 UTC
SUSE-SU-2021:1811-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    slurm-18.08.9-3.19.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    slurm-18.08.9-3.19.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 17 Swamp Workflow Management 2021-05-31 19:26:11 UTC
SUSE-SU-2021:1810-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for HPC 15-SP2 (src):    slurm-20.02.7-3.6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 18 Swamp Workflow Management 2021-06-01 19:15:46 UTC
openSUSE-SU-2021:0821-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    slurm-20.02.7-lp152.2.6.1
Comment 19 Swamp Workflow Management 2021-06-04 10:17:05 UTC
SUSE-SU-2021:1855-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    slurm-17.11.13-6.37.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    slurm-17.11.13-6.37.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    slurm-17.11.13-6.37.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    slurm-17.11.13-6.37.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 20 Swamp Workflow Management 2021-06-04 10:33:27 UTC
SUSE-SU-2021:1856-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    slurm_18_08-18.08.9-1.14.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    slurm_18_08-18.08.9-1.14.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 24 Swamp Workflow Management 2021-07-12 10:18:37 UTC
SUSE-SU-2021:2295-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (important)
Bug References: 1180700,1185603,1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for HPC 15-SP2 (src):    slurm_20_11-20.11.7-6.5.1
SUSE Linux Enterprise High Performance Computing 15-SP2 (src):    slurm_20_11-20.11.7-6.5.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 25 Swamp Workflow Management 2021-07-27 13:24:32 UTC
SUSE-SU-2021:2473-1: An update that solves one vulnerability and has one errata is now available.

Category: security (important)
Bug References: 1180700,1186024
CVE References: CVE-2021-31215
JIRA References: 
Sources used:
SUSE Linux Enterprise Module for HPC 15-SP3 (src):    slurm-20.11.7-4.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 26 Egbert Eich 2021-11-09 16:35:58 UTC
Fixed.