[PATCH v2] tunables: Terminate immediately if end of input is reached
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 11 Sep 2023 22:53:15 +0000 (18:53 -0400)
committerAurelien Jarno <aurel32@debian.org>
Tue, 23 Jan 2024 20:57:06 +0000 (21:57 +0100)
commit8f8f2926332996d8fa0a97fd722bfa935fdb98fb
treea93f58b88de78bc98bb6b5710f99fdbe28ae959a
parentf6258d3d2f5eb486dabfd58186326b1eb25cebcc
[PATCH v2] tunables: Terminate immediately if end of input is reached

The string parsing routine may end up writing beyond bounds of tunestr
if the input tunable string is malformed, of the form name=name=val.
This gets processed twice, first as name=name=val and next as name=val,
resulting in tunestr being name=name=val:name=val, thus overflowing
tunestr.

Terminate the parsing loop at the first instance itself so that tunestr
does not overflow.

Gbp-Pq: Topic any
Gbp-Pq: Name local-CVE-2023-4911.patch
elf/dl-tunables.c