* [sumo] [PATCH v1 1/2] ncurses: CVE-2018-10754
@ 2018-10-05 3:55 Sinan Kaya
2018-10-05 3:55 ` [sumo] [PATCH v1 2/2] git: CVE-2018-11233 Sinan Kaya
2018-10-05 4:48 ` [sumo] [PATCH v1 1/2] ncurses: CVE-2018-10754 Sinan Kaya
0 siblings, 2 replies; 3+ messages in thread
From: Sinan Kaya @ 2018-10-05 3:55 UTC (permalink / raw)
To: openembedded-core
* CVE-2018-10754
A NULL pointer dereference was found in the way the _nc_parse_entry
function parses terminfo data for compilation. An attacker able to provide
specially crafted terminfo data could use this flaw to crash the
application parsing it.
Affects < 6.1.20180414
CVE: CVE-2018-10754
Ref: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-10754
Signed-off-by: Sinan Kaya <okaya@kernel.org>
---
.../ncurses/files/CVE-2018-10754.patch | 34 +++++++++++++++++++
.../ncurses/ncurses_6.0+20171125.bb | 1 +
2 files changed, 35 insertions(+)
create mode 100644 meta/recipes-core/ncurses/files/CVE-2018-10754.patch
diff --git a/meta/recipes-core/ncurses/files/CVE-2018-10754.patch b/meta/recipes-core/ncurses/files/CVE-2018-10754.patch
new file mode 100644
index 0000000000..e9ba857ed2
--- /dev/null
+++ b/meta/recipes-core/ncurses/files/CVE-2018-10754.patch
@@ -0,0 +1,34 @@
+From 7c012e7a809634839e39d67271b5df3fdf5a37a3 Mon Sep 17 00:00:00 2001
+From: Sinan Kaya <okaya@kernel.org>
+Date: Fri, 5 Oct 2018 01:27:27 +0000
+Subject: [PATCH] ncurses: NULL Pointer Dereference in _nc_parse_entry function
+ in tinfo/parse_entry.c
+
+CVE: CVE-2018-10754
+Upstream-Status: Backport [https://bugzilla.redhat.com/show_bug.cgi?id=1576119]
+Signed-off-by: Sinan Kaya <okaya@kernel.org>
+---
+ ncurses/tinfo/parse_entry.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
+index bbbfcb27..43d28bdc 100644
+--- a/ncurses/tinfo/parse_entry.c
++++ b/ncurses/tinfo/parse_entry.c
+@@ -543,9 +543,11 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
+ * Otherwise, look for a base entry that will already
+ * have picked up defaults via translation.
+ */
+- for (i = 0; i < entryp->nuses; i++)
+- if (!strchr((char *) entryp->uses[i].name, '+'))
++ for (i = 0; i < entryp->nuses; i++) {
++ if (entryp->uses[i].name != 0
++ && !strchr(entryp->uses[i].name, '+'))
+ has_base_entry = TRUE;
++ }
+ }
+
+ postprocess_termcap(&entryp->tterm, has_base_entry);
+--
+2.19.0
+
diff --git a/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb b/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb
index 6c4b96f428..e2d128897a 100644
--- a/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb
+++ b/meta/recipes-core/ncurses/ncurses_6.0+20171125.bb
@@ -3,6 +3,7 @@ require ncurses.inc
SRC_URI += "file://0001-tic-hang.patch \
file://0002-configure-reproducible.patch \
file://config.cache \
+ file://CVE-2018-10754.patch \
"
# commit id corresponds to the revision in package version
SRCREV = "5d849e836052459901cfe0b85a0b2939ff8d2b2a"
--
2.19.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [sumo] [PATCH v1 2/2] git: CVE-2018-11233
2018-10-05 3:55 [sumo] [PATCH v1 1/2] ncurses: CVE-2018-10754 Sinan Kaya
@ 2018-10-05 3:55 ` Sinan Kaya
2018-10-05 4:48 ` [sumo] [PATCH v1 1/2] ncurses: CVE-2018-10754 Sinan Kaya
1 sibling, 0 replies; 3+ messages in thread
From: Sinan Kaya @ 2018-10-05 3:55 UTC (permalink / raw)
To: openembedded-core
* CVE-2018-11233
Code to sanity-check pathnames on NTFS can result in reading
out-of-bounds memory.
Affects < 2.17.1
CVE: CVE-2018-11233
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1583888
Signed-off-by: Sinan Kaya <okaya@kernel.org>
---
.../git/files/CVE-2018-11233.patch | 44 +++++++++++++++++++
meta/recipes-devtools/git/git.inc | 3 +-
2 files changed, 46 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/git/files/CVE-2018-11233.patch
diff --git a/meta/recipes-devtools/git/files/CVE-2018-11233.patch b/meta/recipes-devtools/git/files/CVE-2018-11233.patch
new file mode 100644
index 0000000000..f4468cf2fd
--- /dev/null
+++ b/meta/recipes-devtools/git/files/CVE-2018-11233.patch
@@ -0,0 +1,44 @@
+From 014281e62b7920a6d710a85089e00ca012b0744c Mon Sep 17 00:00:00 2001
+From: Jeff King <peff@peff.net>
+Date: Sun, 13 May 2018 12:09:42 -0400
+Subject: [PATCH] is_ntfs_dotgit: use a size_t for traversing string
+
+We walk through the "name" string using an int, which can
+wrap to a negative value and cause us to read random memory
+before our array (e.g., by creating a tree with a name >2GB,
+since "int" is still 32 bits even on most 64-bit platforms).
+Worse, this is easy to trigger during the fsck_tree() check,
+which is supposed to be protecting us from malicious
+garbage.
+
+Note one bit of trickiness in the existing code: we
+sometimes assign -1 to "len" at the end of the loop, and
+then rely on the "len++" in the for-loop's increment to take
+it back to 0. This is still legal with a size_t, since
+assigning -1 will turn into SIZE_MAX, which then wraps
+around to 0 on increment.
+
+Signed-off-by: Jeff King <peff@peff.net>
+CVE: CVE-2018-11233
+Upstream-Status: Backport[https://github.com/git/git/commit/11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d]
+Signed-off-by: Sinan Kaya <okaya@kernel.org>
+---
+ path.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/path.c b/path.c
+index da8b65573..d31c795ff 100644
+--- a/path.c
++++ b/path.c
+@@ -1305,7 +1305,7 @@ static int only_spaces_and_periods(const char *path, size_t len, size_t skip)
+
+ int is_ntfs_dotgit(const char *name)
+ {
+- int len;
++ size_t len;
+
+ for (len = 0; ; len++)
+ if (!name[len] || name[len] == '\\' || is_dir_sep(name[len])) {
+--
+2.19.0
+
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
index bea23ec783..8603c045cc 100644
--- a/meta/recipes-devtools/git/git.inc
+++ b/meta/recipes-devtools/git/git.inc
@@ -8,7 +8,8 @@ PROVIDES_append_class-native = " git-replacement-native"
SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages \
- file://CVE-2018-11235.patch"
+ file://CVE-2018-11235.patch \
+ file://CVE-2018-11233.patch"
S = "${WORKDIR}/git-${PV}"
--
2.19.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [sumo] [PATCH v1 1/2] ncurses: CVE-2018-10754
2018-10-05 3:55 [sumo] [PATCH v1 1/2] ncurses: CVE-2018-10754 Sinan Kaya
2018-10-05 3:55 ` [sumo] [PATCH v1 2/2] git: CVE-2018-11233 Sinan Kaya
@ 2018-10-05 4:48 ` Sinan Kaya
1 sibling, 0 replies; 3+ messages in thread
From: Sinan Kaya @ 2018-10-05 4:48 UTC (permalink / raw)
To: openembedded-core
On 10/4/2018 11:55 PM, Sinan Kaya wrote:
> * CVE-2018-10754
> A NULL pointer dereference was found in the way the _nc_parse_entry
> function parses terminfo data for compilation. An attacker able to provide
> specially crafted terminfo data could use this flaw to crash the
> application parsing it.
>
> Affects < 6.1.20180414
>
> CVE: CVE-2018-10754
> Ref:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-10754
> Signed-off-by: Sinan Kaya<okaya@kernel.org>
Self NAK on this ncurses patch only. This broke docker.
The rest of the patches looked good to me.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-05 4:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05 3:55 [sumo] [PATCH v1 1/2] ncurses: CVE-2018-10754 Sinan Kaya
2018-10-05 3:55 ` [sumo] [PATCH v1 2/2] git: CVE-2018-11233 Sinan Kaya
2018-10-05 4:48 ` [sumo] [PATCH v1 1/2] ncurses: CVE-2018-10754 Sinan Kaya
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.