aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2018-01-26 09:48:00 +0000
committerTatsuya Kinoshita <tats@debian.org>2018-01-26 09:48:00 +0000
commitcfe407def7d6fd10c905f7b20e57b85122a1c8d9 (patch)
tree6f019e679081ca32a15e525a5e69774c59f13274 /debian
parentNew patch 955_tbl-indent.patch to fix stack overflow [CVE-2018-6196] (diff)
downloadw3m-cfe407def7d6fd10c905f7b20e57b85122a1c8d9.tar.gz
w3m-cfe407def7d6fd10c905f7b20e57b85122a1c8d9.zip
New patch 956_columnpos.patch to fix null deref [CVE-2018-6197]
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/956_columnpos.patch18
-rw-r--r--debian/patches/series1
2 files changed, 19 insertions, 0 deletions
diff --git a/debian/patches/956_columnpos.patch b/debian/patches/956_columnpos.patch
new file mode 100644
index 0000000..e8e6118
--- /dev/null
+++ b/debian/patches/956_columnpos.patch
@@ -0,0 +1,18 @@
+Subject: Prevent invalid columnPos() call in formUpdateBuffer()
+From: Tatsuya Kinoshita <tats@debian.org>
+Bug-Debian: https://github.com/tats/w3m/issues/89 [CVE-2018-6197]
+Origin: https://salsa.debian.org/debian/w3m/commit/7fdc83b0364005a0b5ed869230dd81752ba022e8
+
+diff --git a/form.c b/form.c
+index 0605513..0a71f9c 100644
+--- a/form.c
++++ b/form.c
+@@ -483,6 +483,8 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
+ rows = form->rows ? form->rows : 1;
+ col = COLPOS(l, a->start.pos);
+ for (c_rows = 0; c_rows < rows; c_rows++, l = l->next) {
++ if (l == NULL)
++ break;
+ if (rows > 1) {
+ pos = columnPos(l, col);
+ a = retrieveAnchor(buf->formitem, l->linenumber, pos);
diff --git a/debian/patches/series b/debian/patches/series
index 2cc6a0f..3600e96 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
010_upstream.patch
020_debian.patch
955_tbl-indent.patch
+956_columnpos.patch