components/lua/patches/CVE-2014-5461.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Sat, 14 May 2016 15:44:53 -0700
changeset 5987 c070fc9ea447
parent 2064 a946477e6a46
permissions -rw-r--r--
Close of build 99.4.

An overflow flaw was fixed in Lua 5.2.2:

  http://www.lua.org/bugs.html#5.2.2-1

This could cause the application to crash or, potentially, execute arbitrary
code. One way an attacker could trigger this issue is if they can control
parameters to a loadstring call (an eval in Lua,
http://en.wikipedia.org/wiki/Eval#Lua).

See also:

  https://bugzilla.redhat.com/show_bug.cgi?id=1132304

--- src/ldo.c.orig	2014-08-31 09:13:13.318213607 -0700
+++ src/ldo.c	2014-08-31 09:23:49.433127527 -0700
@@ -323,7 +323,7 @@
     case LUA_TLCL: {  /* Lua function: prepare its call */
       StkId base;
       Proto *p = clLvalue(func)->p;
-      luaD_checkstack(L, p->maxstacksize);
+      luaD_checkstack(L, p->maxstacksize + p->numparams);
       func = restorestack(L, funcr);
       n = cast_int(L->top - func) - 1;  /* number of real arguments */
       for (; n < p->numparams; n++)