]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: sessions: unlink session from list on out of memory
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Nov 2014 16:10:33 +0000 (17:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Nov 2014 21:09:05 +0000 (22:09 +0100)
commit3b24641745b32289235d765f441ec60fa7381f99
tree94e0365c97f50b6a5a03d30b5b2d8f11108af771
parentc9a0f6d0232cf44d6b08d1964b9097a45a6c65f0
BUG/MAJOR: sessions: unlink session from list on out of memory

Since embryonic sessions were introduced in 1.5-dev12 with commit
2542b53 ("MAJOR: session: introduce embryonic sessions"), a major
bug remained present. If haproxy cannot allocate memory during
session_complete() (for example, no more buffers), it will not
unlink the new session from the sessions list. This will cause
memory corruptions if the memory area from the session is reused
for anything else, and may also cause bogus output on "show sess"
on the CLI.

This fix must be backported to 1.5.
src/session.c