Upgrade to tmux-3.2a (CVE-2020-27347)

Resolves: rhbz#2003007

Signed-off-by: David Cantrell <david.l.cantrell@gmail.com>
This commit is contained in:
David Cantrell 2021-12-03 11:38:29 -05:00
parent a7b986841f
commit 94f9e7ea34
10 changed files with 155 additions and 4 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@ tmux-1.3.tar.gz
/tmux-3.0a.tar.gz
/tmux-3.1.tar.gz
/tmux-3.1c.tar.gz
/tmux-3.2a.tar.gz

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1 +1 @@
SHA512 (tmux-3.1c.tar.gz) = aad2e6457dd350369f245f711f1936a575d0588b72e660d10e7abc7d373da0d322903b451ad00b96a3e0e6847ca855673da6a4c5447cea91fa756edd23659397
SHA512 (tmux-3.2a.tar.gz) = 6e52c7f5d03b2c8b8c4c8caac092a166956ba97334b426f2823d74dc5849a1d31a80145924f641f69dd2c244809e9350d9bd7070897fa2e3e1f9f086f9b2f365

19
tests/scripts/correct-elf.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
PATH=/usr/bin
TMUX=/usr/bin/tmux
echo -n "checking to see that ${TMUX} is an ELF executable..."
case "$(file -b --mime-type "${TMUX}")" in
application/x-executable|application/x-pie-executable|application/x-sharedlib)
echo "ok"
RET=0
;;
*)
echo "FAIL"
RET=1
;;
esac
exit ${RET}

16
tests/scripts/exists.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
PATH=/usr/bin
TMUX=/usr/bin/tmux
echo -n "checking to see that ${TMUX} exists..."
if [ -f "${TMUX}" ]; then
echo "ok"
RET=0
else
echo "FAIL"
RET=1
fi
exit ${RET}

View File

@ -0,0 +1,19 @@
#!/bin/sh
PATH=/usr/bin
TMUX=/usr/bin/tmux
echo -n "verifying ${TMUX}'s filename contains all lowercase letters..."
BASETMUX="$(basename $(stat -L -c "%n" ${TMUX}))"
LOWERTMUX="$(echo "${BASETMUX}" | tr [A-Z] [a-z])"
if [ "${BASETMUX}" = "${LOWERTMUX}" ]; then
echo "ok"
RET=0
else
echo "FAIL"
RET=1
fi
exit ${RET}

21
tests/scripts/help-output.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
PATH=/usr/bin
TMUX=/usr/bin/tmux
echo -n "checking for ${TMUX} --help output and exit code..."
STDOUT="$(${TMUX} --help 2>/dev/null)"
STDERR="$(${TMUX} --help 2>&1 | head -n 1 | cut -c-11)"
${TMUX} --help >/dev/null 2>&1
EXITCODE=$?
if [ ${EXITCODE} -eq 1 ] && [ -z "${STDOUT}" ] && [ "${STDERR}" = "usage: tmux" ]; then
echo "ok"
RET=0
else
echo "FAIL"
RET=1
fi
exit ${RET}

23
tests/scripts/launch-top.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
PATH=/usr/bin
TMUX=/usr/bin/tmux
SESSION_NAME="$(basename $0 .sh)"
RET=0
echo -n "checking that ${TMUX} can start a new session with 'top'..."
${TMUX} new-session -d -s ${SESSION_NAME} 'top' || ( echo "FAIL" ; exit 1 )
TOPPID=$(pgrep -x top)
PGREPCODE=$?
if [ -z "${TOPPID}" ] || [ ${PGREPCODE} -ne 0 ]; then
RET=1
elif [ ! -d /proc/${TOPPID} ]; then
RET=1
fi
${TMUX} kill-session -t ${SESSION_NAME} || ( echo "FAIL" ; exit 1 )
[ ${RET} -eq 0 ] && echo "ok" || echo "FAIL"
exit ${RET}

25
tests/tests.yml Normal file
View File

@ -0,0 +1,25 @@
---
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- tmux
tests:
- exists:
dir: scripts/
run: ./exists.sh
- correct-elf:
dir: scripts/
run: ./correct-elf.sh
- filename-lowercase:
dir: scripts/
run: ./filename-lowercase.sh
- help-output:
dir: scripts/
run: ./help-output.sh
- launch-top:
dir: scripts/
run: ./launch-top.sh

View File

@ -1,7 +1,7 @@
%global _hardened_build 1
Name: tmux
Version: 3.1c
Version: 3.2a
Release: 4%{?dist}
Summary: A terminal multiplexer
@ -13,8 +13,11 @@ Source0: https://github.com/tmux/%{name}/releases/download/%{version}/%{n
# Examples has been removed - so include the bash_completion here
Source1: bash_completion_tmux.sh
BuildRequires: make
BuildRequires: make
BuildRequires: gcc
BuildRequires: bison
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: pkgconfig(libevent)
BuildRequires: pkgconfig(tinfo)
BuildRequires: pkgconfig(ncurses)
@ -28,9 +31,11 @@ intended to be a simple, modern, BSD-licensed alternative to programs such
as GNU Screen.
%prep
%autosetup
%setup
%build
autoreconf -f -i -v
%configure
%make_build
@ -67,6 +72,22 @@ fi
%{_datadir}/bash-completion/completions/tmux
%changelog
* Fri Dec 03 2021 David Cantrell <dcantrell@redhat.com> - 3.2a-4
- Rebuild
Resolves: rhbz#2003007
* Mon Sep 27 2021 David Cantrell <dcantrell@redhat.com> - 3.2a-3
- Rebuild
Related: rhbz#1910707
* Wed Sep 22 2021 David Cantrell <dcantrell@redhat.com> - 3.2a-2
- Ensure gating test files are present in the source repo
Related: rhbz#1910707
* Wed Sep 01 2021 David Cantrell <dcantrell@redhat.com> - 3.2a-1
- Upgrade to tmux-3.2a (CVE-2020-27347)
Resolves: rhbz#1910707
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.1c-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688