diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2016-05-29 08:50:15 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2016-05-29 09:47:46 +0300 |
| commit | 32fddd8e29ba6bfebc7ba2081f02d2dc9730256a (patch) | |
| tree | 69bbec1ebbfda9e34e4487d077ba988ef9727850 | |
| parent | 576b1aeed6c315370135025d3cd4db54c388a143 (diff) | |
gnu: lua-5.1: Fix CVE-2014-5461.
* gnu/packages/lua.scm (lua-5.1)[source]: Add patch.
* gnu/packages/patches/lua-CVE-2014-5461: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/lua.scm | 4 | ||||
| -rw-r--r-- | gnu/packages/patches/lua-CVE-2014-5461.patch | 20 |
3 files changed, 24 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 86b56d4047e..9a9cff42386 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -612,6 +612,7 @@ dist_patch_DATA = \ | |||
| 612 | %D%/packages/patches/lirc-localstatedir.patch \ | 612 | %D%/packages/patches/lirc-localstatedir.patch \ |
| 613 | %D%/packages/patches/libpthread-glibc-preparation.patch \ | 613 | %D%/packages/patches/libpthread-glibc-preparation.patch \ |
| 614 | %D%/packages/patches/lm-sensors-hwmon-attrs.patch \ | 614 | %D%/packages/patches/lm-sensors-hwmon-attrs.patch \ |
| 615 | %D%/packages/patches/lua-CVE-2014-5461.patch \ | ||
| 615 | %D%/packages/patches/lua-pkgconfig.patch \ | 616 | %D%/packages/patches/lua-pkgconfig.patch \ |
| 616 | %D%/packages/patches/lua51-liblua-so.patch \ | 617 | %D%/packages/patches/lua51-liblua-so.patch \ |
| 617 | %D%/packages/patches/lua52-liblua-so.patch \ | 618 | %D%/packages/patches/lua52-liblua-so.patch \ |
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 17874f86ab7..a5315342eac 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com> | 3 | ;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com> |
| 4 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> | 4 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
| 5 | ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr> | 5 | ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr> |
| 6 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> | ||
| 6 | ;;; | 7 | ;;; |
| 7 | ;;; This file is part of GNU Guix. | 8 | ;;; This file is part of GNU Guix. |
| 8 | ;;; | 9 | ;;; |
| @@ -78,7 +79,8 @@ for configuration, scripting, and rapid prototyping.") | |||
| 78 | version ".tar.gz")) | 79 | version ".tar.gz")) |
| 79 | (sha256 | 80 | (sha256 |
| 80 | (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16")) | 81 | (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16")) |
| 81 | (patches (search-patches "lua51-liblua-so.patch")))))) | 82 | (patches (search-patches "lua51-liblua-so.patch" |
| 83 | "lua-CVE-2014-5461.patch")))))) | ||
| 82 | 84 | ||
| 83 | (define-public luajit | 85 | (define-public luajit |
| 84 | (package | 86 | (package |
diff --git a/gnu/packages/patches/lua-CVE-2014-5461.patch b/gnu/packages/patches/lua-CVE-2014-5461.patch new file mode 100644 index 00000000000..bc72ef14ad2 --- /dev/null +++ b/gnu/packages/patches/lua-CVE-2014-5461.patch | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | From: Enrico Tassi <gareuselesinge@debian.org> | ||
| 2 | Date: Tue, 26 Aug 2014 16:20:55 +0200 | ||
| 3 | Subject: Fix stack overflow in vararg functions | ||
| 4 | |||
| 5 | --- | ||
| 6 | src/ldo.c | 2 +- | ||
| 7 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 8 | |||
| 9 | diff --git a/src/ldo.c b/src/ldo.c | ||
| 10 | index d1bf786..30333bf 100644 | ||
| 11 | --- a/src/ldo.c | ||
| 12 | +++ b/src/ldo.c | ||
| 13 | @@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) { | ||
| 14 | CallInfo *ci; | ||
| 15 | StkId st, base; | ||
| 16 | Proto *p = cl->p; | ||
| 17 | - luaD_checkstack(L, p->maxstacksize); | ||
| 18 | + luaD_checkstack(L, p->maxstacksize + p->numparams); | ||
| 19 | func = restorestack(L, funcr); | ||
| 20 | base = func + 1; | ||
