[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)
committerRaspbian forward porter <root@raspbian.org>
Tue, 6 Feb 2024 22:41:45 +0000 (22:41 +0000)
commitdfc2794a83c5ecb2625b2e7255b41d6db2ee18a8
tree0a283cf9a5237bb9ecaa6791ac9c8a3f82bd782c
parent0aa71cf24ec46c4e8d0806ecabe87b23a754350d
[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