nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

lua5_2: add patch for CVE-2022-28805

Derived from https://github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa

authored by

Robin Gloster and committed by
Maximilian Bosch
04d41ba8 549e4afe

+13 -1
+10
pkgs/development/interpreters/lua-5/CVE-2022-28805.patch
··· 1 + --- a/src/lparser.c 2 + +++ b/src/lparser.c 3 + @@ -301,6 +301,7 @@ 4 + expdesc key; 5 + singlevaraux(fs, ls->envn, var, 1); /* get environment variable */ 6 + lua_assert(var->k == VLOCAL || var->k == VUPVAL); 7 + + luaK_exp2anyregup(fs, var); /* but could be a constant */ 8 + codestring(ls, &key, varname); /* key is variable name */ 9 + luaK_indexed(fs, var, &key); /* env[varname] */ 10 + }
+3 -1
pkgs/development/interpreters/lua-5/default.nix
··· 32 32 sourceVersion = { major = "5"; minor = "2"; patch = "4"; }; 33 33 hash = "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"; 34 34 makeWrapper = makeBinaryWrapper; 35 - patches = lib.optional stdenv.isDarwin ./5.2.darwin.patch; 35 + patches = [ 36 + ./CVE-2022-28805.patch 37 + ] ++ lib.optional stdenv.isDarwin ./5.2.darwin.patch; 36 38 }; 37 39 38 40 lua5_2_compat = lua5_2.override({