diff options
| -rw-r--r-- | meta/recipes-extended/screen/screen/CVE-2020-9366.patch | 48 | ||||
| -rw-r--r-- | meta/recipes-extended/screen/screen_4.6.2.bb | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-extended/screen/screen/CVE-2020-9366.patch b/meta/recipes-extended/screen/screen/CVE-2020-9366.patch new file mode 100644 index 0000000000..a52b9e6e68 --- /dev/null +++ b/meta/recipes-extended/screen/screen/CVE-2020-9366.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 8ce90c1d3d5bece150479d8bc9303fd9d9f45e03 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net> | ||
| 3 | Date: Thu, 30 Jan 2020 17:56:27 +0100 | ||
| 4 | Subject: [PATCH] Fix out of bounds access when setting w_xtermosc after OSC 49 | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net> | ||
| 10 | MIME-Version: 1.0 | ||
| 11 | Content-Type: text/plain; charset=UTF-8 | ||
| 12 | Content-Transfer-Encoding: 8bit | ||
| 13 | |||
| 14 | echo -e "\e]49\e; \n\ec" | ||
| 15 | crashes screen. | ||
| 16 | |||
| 17 | This happens because 49 is divided by 10 and used as table index | ||
| 18 | resulting in access to w_xtermosc[4], which is out of bounds with table | ||
| 19 | itself being size 4. Increase size of table by 1 to 5, which is enough | ||
| 20 | for all current uses. | ||
| 21 | |||
| 22 | As this overwrites memory based on user input it is potential security | ||
| 23 | issue. | ||
| 24 | |||
| 25 | Reported-by: pippin@gimp.org | ||
| 26 | Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> | ||
| 27 | |||
| 28 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/screen.git/commit/?h=v.4.8.0&id=68386dfb1fa33471372a8cd2e74686758a2f527b] | ||
| 29 | CVE: CVE-2020-9366 | ||
| 30 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
| 31 | |||
| 32 | --- | ||
| 33 | window.h | 2 +- | ||
| 34 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 35 | |||
| 36 | diff --git a/window.h b/window.h | ||
| 37 | index bd10dcd..a8afa19 100644 | ||
| 38 | --- a/window.h | ||
| 39 | +++ b/window.h | ||
| 40 | @@ -237,7 +237,7 @@ struct win | ||
| 41 | char w_vbwait; | ||
| 42 | char w_norefresh; /* dont redisplay when switching to that win */ | ||
| 43 | #ifdef RXVT_OSC | ||
| 44 | - char w_xtermosc[4][MAXSTR]; /* special xterm/rxvt escapes */ | ||
| 45 | + char w_xtermosc[5][MAXSTR]; /* special xterm/rxvt escapes */ | ||
| 46 | #endif | ||
| 47 | int w_mouse; /* mouse mode 0,9,1000 */ | ||
| 48 | #ifdef HAVE_BRAILLE | ||
diff --git a/meta/recipes-extended/screen/screen_4.6.2.bb b/meta/recipes-extended/screen/screen_4.6.2.bb index 21b476ddb0..d00b849021 100644 --- a/meta/recipes-extended/screen/screen_4.6.2.bb +++ b/meta/recipes-extended/screen/screen_4.6.2.bb | |||
| @@ -25,6 +25,7 @@ SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \ | |||
| 25 | file://0001-fix-for-multijob-build.patch \ | 25 | file://0001-fix-for-multijob-build.patch \ |
| 26 | file://0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch \ | 26 | file://0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch \ |
| 27 | file://0001-Remove-more-compatibility-stuff.patch \ | 27 | file://0001-Remove-more-compatibility-stuff.patch \ |
| 28 | file://CVE-2020-9366.patch \ | ||
| 28 | " | 29 | " |
| 29 | 30 | ||
| 30 | SRC_URI[md5sum] = "a0f529d3333b128dfaa324d978ba73a8" | 31 | SRC_URI[md5sum] = "a0f529d3333b128dfaa324d978ba73a8" |
