Accepting request 992353 from home:eeich:branches:network:cluster

- Fix a potential security vulnerability in the test package
  (bsc#1201674, CVE-2022-31251).

- Patch NOFILE Limit in the slurmd.service copy for the testsuite.

OBS-URL: https://build.opensuse.org/request/show/992353
OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=214
This commit is contained in:
Egbert Eich 2022-08-02 15:34:01 +00:00 committed by Git OBS Bridge
parent fd509c0258
commit b60ac5f569
2 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 2 12:43:39 UTC 2022 - Egbert Eich <eich@suse.com>
- Fix a potential security vulnerability in the test package
(bsc#1201674, CVE-2022-31251).
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 21 19:20:42 UTC 2022 - Bernhard Wiedemann <bwiedemann@suse.com> Thu Jul 21 19:20:42 UTC 2022 - Bernhard Wiedemann <bwiedemann@suse.com>
@ -8,8 +14,7 @@ Thu Jul 14 15:20:46 UTC 2022 - Egbert Eich <eich@suse.com>
- Improve check for mpicc in testsuite package: if binary isn't - Improve check for mpicc in testsuite package: if binary isn't
found, don't crash. found, don't crash.
- Fix a typo which prevented the nproc limit for slurmd to be - Patch NOFILE Limit in the slurmd.service copy for the testsuite.
up-ed for the test suite.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jun 20 09:23:17 UTC 2022 - Christian Goll <cgoll@suse.com> Mon Jun 20 09:23:17 UTC 2022 - Christian Goll <cgoll@suse.com>

View File

@ -883,7 +883,8 @@ tar --group=%slurm_g --owner=%slurm_u \
cd - cd -
rm -rf %{buildroot}/srv/slurm-testsuite rm -rf %{buildroot}/srv/slurm-testsuite
mkdir -p %{buildroot}/srv/slurm-testsuite mkdir -p %{buildroot}/srv/slurm-testsuite
mv /tmp/slurmtest.tar.bz2 %{buildroot}/srv/slurm-testsuite mkdir -p %{buildroot}/%{_datadir}/%{name}
mv /tmp/slurmtest.tar.bz2 %{buildroot}/%{_datadir}/%{name}
mkdir -p %{buildroot}/etc/sudoers.d mkdir -p %{buildroot}/etc/sudoers.d
echo "slurm ALL=(auser) NOPASSWD:ALL" > %{buildroot}/etc/sudoers.d/slurm echo "slurm ALL=(auser) NOPASSWD:ALL" > %{buildroot}/etc/sudoers.d/slurm
@ -895,7 +896,12 @@ cp %{buildroot}/%_unitdir/slurmd.service $SLURMD_SERVICE
if grep -qE "^LimitNPROC" $SLURMD_SERVICE; then if grep -qE "^LimitNPROC" $SLURMD_SERVICE; then
sed -i -e '/LimitNPROC/s@=.*@=infinity@' $SLURMD_SERVICE sed -i -e '/LimitNPROC/s@=.*@=infinity@' $SLURMD_SERVICE
else else
sed -i -e '/LimitNPROC/aLimitNPROC=infinity' $SLURMD_SERVICE sed -i -e '/LimitSTACK/aLimitNPROC=infinity' $SLURMD_SERVICE
fi
if grep -qE "^LimitNOFILE" $SLURMD_SERVICE; then
sed -i -e '/LimitNOFILE/s@=.*@=131072:infinity@' $SLURMD_SERVICE
else
sed -i -e '/LimitSTACK/aLimitNOFILE=131072:infinity' $SLURMD_SERVICE
fi fi
sed -i -e '/ExecStart/aExecStartPre=/bin/bash -c "for i in 0 1 2 3; do test -e /dev/nvidia$i || mknod /dev/nvidia$i c 10 $((i+2)); done"' $SLURMD_SERVICE sed -i -e '/ExecStart/aExecStartPre=/bin/bash -c "for i in 0 1 2 3; do test -e /dev/nvidia$i || mknod /dev/nvidia$i c 10 $((i+2)); done"' $SLURMD_SERVICE
@ -1037,7 +1043,7 @@ exit 0
%post testsuite %post testsuite
rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsuite/config.h rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsuite/config.h
tar --same-owner -C /srv/slurm-testsuite -xjf /srv/slurm-testsuite/slurmtest.tar.bz2 sudo -u %slurm_u /usr/bin/tar --same-owner -C /srv/slurm-testsuite -xjf %{_datadir}/%{name}/slurmtest.tar.bz2
%preun testsuite %preun testsuite
rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsuite/config.h rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsuite/config.h
@ -1473,6 +1479,7 @@ rm -rf /srv/slurm-testsuite/src /srv/slurm-testsuite/testsuite /srv/slurm-testsu
%files testsuite %files testsuite
%defattr(-, %slurm_u, %slurm_u, -) %defattr(-, %slurm_u, %slurm_u, -)
%dir %attr(-, %slurm_u, %slurm_u) /srv/slurm-testsuite %dir %attr(-, %slurm_u, %slurm_u) /srv/slurm-testsuite
%attr(-, root, root) %{_datadir}/%{name}
%if 0%{?sle_version} == 120200 %if 0%{?sle_version} == 120200
%dir %{_pam_secconfdir}/limits.d %dir %{_pam_secconfdir}/limits.d
%endif %endif