[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>
Wed, 30 Apr 2025 01:01:35 +0000 (09:01 +0800)
commitdf7d165bdb15509f72cf51e9ec359e1831d90606
tree26d1e2963302c68822135246cad4861b59a7ae7e
parentfd3788388ba57fbd9406e0b2a198c17c483647a3
[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