]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: ssl: reject a \0 byte in ssl_fc_npn 20260911-embedded-nul-char
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 15 Sep 2026 12:08:18 +0000 (14:08 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 16 Sep 2026 07:18:11 +0000 (09:18 +0200)
commit0decf6a60f8c30a82ba819c0b1dc66db25fb8ae4
tree7efe8d33c4e811ecd8414fc10675a837e5784976
parent96bb716af7b0c53aeee8bd6546276b54152a97ce
BUG/MINOR: ssl: reject a \0 byte in ssl_fc_npn

A string sample cannot contain a \0 byte, but ssl_fc_npn returned the
NPN protocol name as sent by the client, which OpenSSL stores without
checking it against the configured list, so a client could put a \0 in
it. Such a value was then matched by "-m str" on its prefix.

Fail the fetch when the name holds a \0 byte. This only applies when
"npn" is set on the bind line.

This must be backported to all stable branches.
src/ssl_sample.c