Errors in config file values get swallowed, disable other directives #20789
Labels
branch: master
Merge to master branch
branch: 3.0
Merge to openssl-3.0 branch
branch: 3.1
Merge to openssl-3.1
triaged: bug
The issue/pr is/fixes a bug
OpenSSL master (c809334,
./config no-shared).I'm gonna define the following config
for use with
OPENSSL_CONF=openssl.cnf apps/openssl s_client ecc256.badssl.com:443and vary just the last two lines for brewity.
That allows me to establish a TLS 1.2 connection using ECDSA-SHA256 and prime256v1.
Uncommenting
Groups:leads to SSL alert number 40, which I'm OK with.
Now let's add an unrecognized value to
Groups:That results in a successful connection like in a baseline case,
so I'm assuming
Groupsreverts to whatever default it has.What's worse, is that this effect works across lines:
also results in a successful connection, as if
Groupsis ignored!Finally, switching the order of the directives
makes the masking effect go away (connection fails),
so I assume it's the rest of the config (section?) that gets ignored
after encountering one invalid value.
I'm aware of
config_diagnostics = 1, but it doesn't seem to help here.Please consider failing hard on encountering an invalid/unrecognized value.
Not only the current behaviour is painfully error prone,
(
Groups = P-384:P-512is the same asGroups = P-384,P-521)but also the scope of the resulting misconfiguration is much wider than my wildest imagination
(they both effectively mean "ignore this and following lines", somehow).
As a result, it becomes very hard to configure the algorithm selection in a robust and secure manner.
The text was updated successfully, but these errors were encountered: