Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changes-entries/lua-parsebody-off-t.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*) mod_lua: Fix a stack write past a 4-byte object in r:parsebody() where
the body length was read through an apr_off_t* aliased onto an apr_size_t,
corrupting adjacent stack on builds with sizeof(apr_off_t) > sizeof(apr_size_t)
(32-bit large-file). [arshiya tabasum]
4 changes: 3 additions & 1 deletion modules/lua/lua_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,11 @@ static int req_parsebody(lua_State *L)
int i;
size_t vlen = 0;
size_t len = 0;
if (lua_read_body(r, &data, (apr_off_t*) &size, max_post_size) != OK) {
apr_off_t body_len = 0;
if (lua_read_body(r, &data, &body_len, max_post_size) != OK) {
return 2;
}
size = (apr_size_t) body_len;
len = strlen(multipart);
i = 0;
for
Expand Down