diff options
| author | Jose Quaresma <quaresma.jose@gmail.com> | 2024-07-04 11:56:17 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-07-04 22:56:15 +0100 |
| commit | 687f3022c4826d12ad8cb8d718bee0a5b6ad1d1e (patch) | |
| tree | 4c086a37144cf2cf6c47fbf300854dd5b6fdd65c | |
| parent | a7d13a3cface5322e7ff3ba9bf27ca8def1e3a4d (diff) | |
| download | poky-687f3022c4826d12ad8cb8d718bee0a5b6ad1d1e.tar.gz | |
openssh: fix CVE-2024-6387
sshd(8) in Portable OpenSSH versions 8.5p1 to 9.7p1 (inclusive).
Race condition resulting in potential remote code execution.
A race condition in sshd(8) could allow remote code execution as root on non-OpenBSD systems.
This attack could be prevented by disabling the login grace timeout (LoginGraceTime=0 in sshd_config)
though this makes denial-of service against sshd(8) considerably easier.
For more information, please refer to the release notes [1] and the
report from the Qualys Security Advisory Team [2] who discovered the bug.
[1] https://www.openssh.com/txt/release-9.8
[2] https://www.qualys.com/2024/07/01/cve-2024-6387/regresshion.txt
References:
https://www.openssh.com/security.html
(From OE-Core rev: 7ba7c96f31bd81c5d1352136e405e99c3df29ea7)
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-connectivity/openssh/openssh/CVE-2024-6387.patch | 27 | ||||
| -rw-r--r-- | meta/recipes-connectivity/openssh/openssh_9.7p1.bb | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/CVE-2024-6387.patch b/meta/recipes-connectivity/openssh/openssh/CVE-2024-6387.patch new file mode 100644 index 0000000000..3e7c707100 --- /dev/null +++ b/meta/recipes-connectivity/openssh/openssh/CVE-2024-6387.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | Description: fix signal handler race condition | ||
| 2 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/2070497 | ||
| 3 | |||
| 4 | CVE: CVE-2024-6387 | ||
| 5 | |||
| 6 | Upstream-Status: Backport | ||
| 7 | https://git.launchpad.net/ubuntu/+source/openssh/commit/?h=applied/ubuntu/jammy-devel&id=b059bcfa928df4ff2d103ae2e8f4e3136ee03efc | ||
| 8 | |||
| 9 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
| 10 | |||
| 11 | --- a/log.c | ||
| 12 | +++ b/log.c | ||
| 13 | @@ -452,12 +452,14 @@ void | ||
| 14 | sshsigdie(const char *file, const char *func, int line, int showfunc, | ||
| 15 | LogLevel level, const char *suffix, const char *fmt, ...) | ||
| 16 | { | ||
| 17 | +#if 0 | ||
| 18 | va_list args; | ||
| 19 | |||
| 20 | va_start(args, fmt); | ||
| 21 | sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, | ||
| 22 | suffix, fmt, args); | ||
| 23 | va_end(args); | ||
| 24 | +#endif | ||
| 25 | _exit(1); | ||
| 26 | } | ||
| 27 | |||
diff --git a/meta/recipes-connectivity/openssh/openssh_9.7p1.bb b/meta/recipes-connectivity/openssh/openssh_9.7p1.bb index 0bc14c5553..69eade3ee7 100644 --- a/meta/recipes-connectivity/openssh/openssh_9.7p1.bb +++ b/meta/recipes-connectivity/openssh/openssh_9.7p1.bb | |||
| @@ -26,6 +26,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar | |||
| 26 | file://sshd_check_keys \ | 26 | file://sshd_check_keys \ |
| 27 | file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \ | 27 | file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \ |
| 28 | file://0001-systemd-Add-optional-support-for-systemd-sd_notify.patch \ | 28 | file://0001-systemd-Add-optional-support-for-systemd-sd_notify.patch \ |
| 29 | file://CVE-2024-6387.patch \ | ||
| 29 | " | 30 | " |
| 30 | SRC_URI[sha256sum] = "490426f766d82a2763fcacd8d83ea3d70798750c7bd2aff2e57dc5660f773ffd" | 31 | SRC_URI[sha256sum] = "490426f766d82a2763fcacd8d83ea3d70798750c7bd2aff2e57dc5660f773ffd" |
| 31 | 32 | ||
