[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>
Mon, 2 Oct 2023 20:22:57 +0000 (21:22 +0100)
commit793e26f637dbfb504b1b569e1ceb2b8f573580ae
tree126af83e8f1b52ee4b48bcda0d600ed0f94150a6
parentb8bb82bcba4fda3ade4a29c07a10d148b42ba36b
[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