[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)
committerSean Whitton <spwhitton@spwhitton.name>
Tue, 27 May 2025 10:40:04 +0000 (11:40 +0100)
commit66dc40288f041a7d43209ec7091e9f237573b8aa
tree52c8e22f3caee0eb8b2cdefc2131365487e4b94b
parent8b8135ee75c76aaab0ad98739edd06865e68d072
[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