[lxc/lxc] 590a95: rexec: Avoid invalid free in rexec failure path

0 views
Skip to first unread message

Serge Hallyn

unread,
Mar 22, 2024, 9:35:12 PMMar 22
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/main
Home: https://github.com/lxc/lxc
Commit: 590a95d836324257cff63b8a3d275f772b9f9fc4
https://github.com/lxc/lxc/commit/590a95d836324257cff63b8a3d275f772b9f9fc4
Author: Petr Malat <o...@malat.biz>
Date: 2024-03-19 (Tue, 19 Mar 2024)

Changed paths:
M src/lxc/rexec.c

Log Message:
-----------
rexec: Avoid invalid free in rexec failure path

Commit "rexec: free argv array on failure" used __do_free_string_list
as a destructor for argv, which is an array of pointers to a single
buffer and not an array of pointers to independent buffers, which leads
to an attempt to free invalid pointer whenever argv has more than one
element.

Structure argv as one memory block and use __do_free as the destructor.

Signed-off-by: Petr Malat <o...@malat.biz>


Commit: 632b27b9949e4422c186e44bd423c59ea4a06865
https://github.com/lxc/lxc/commit/632b27b9949e4422c186e44bd423c59ea4a06865
Author: Serge Hallyn <se...@hallyn.com>
Date: 2024-03-22 (Fri, 22 Mar 2024)

Changed paths:
M src/lxc/rexec.c

Log Message:
-----------
Merge pull request #4412 from petris/fix_rexec_free

rexec: Avoid invalid free in rexec failure path


Compare: https://github.com/lxc/lxc/compare/4b8d64efcdab...632b27b9949e

To unsubscribe from these emails, change your notification settings at https://github.com/lxc/lxc/settings/notifications
Reply all
Reply to author
Forward
0 new messages