[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>
Thu, 15 Aug 2024 09:21:36 +0000 (11:21 +0200)
commitbb4d0c09b3694d557bfc5044f9aca89727055c80
tree7cd44d5023fc2d0d80bed07d70f1663b33b3bbb4
parent1d50f2ea8b5c40526ab953f8b13a276cc674838f
[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