[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251203110226.4ae00f1f@pumpkin>
Date: Wed, 3 Dec 2025 11:02:26 +0000
From: David Laight <david.laight.linux@...il.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org, Nathan Chancellor <nathan@...nel.org>, Peter
Zijlstra <peterz@...radead.org>, Alexandre Chartre
<alexandre.chartre@...cle.com>
Subject: Re: [PATCH] objtool: Fix stack overflow in validate_branch()
On Tue, 2 Dec 2025 15:01:17 -0800
Josh Poimboeuf <jpoimboe@...nel.org> wrote:
...
> + while (fgets(line, sizeof(line), fp)) {
> + if (strstr(line, "[stack]")) {
> + if (sscanf(line, "%lx-%lx", &stack_start, &stack_end) != 2) {
> + ERROR_GLIBC("sscanf");
> + ret = -1;
> + goto done;
> + }
> + stack_limit = stack_end - rlim.rlim_cur;
> + goto done;
That assumes 'stack grows down'.
Someone will copy the code onto a 'backwards stack' system one day.
(I can't remember which ones they are.)
David
Powered by blists - more mailing lists