lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-2e9490ba5830a60a18a359192e938b2ad1710120@git.kernel.org>
Date:   Tue, 30 Jan 2018 00:47:10 -0800
From:   tip-bot for Josh Poimboeuf <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     luto@...nel.org, peterz@...radead.org, linux@...ck-us.net,
        dwmw2@...radead.org, hpa@...or.com, gregkh@...uxfoundation.org,
        bp@...en8.de, tglx@...utronix.de, linux-kernel@...r.kernel.org,
        mingo@...nel.org, dave.hansen@...ux.intel.com, jgross@...e.com,
        torvalds@...ux-foundation.org, jpoimboe@...hat.com
Subject: [tip:x86/pti] objtool: Warn on stripped section symbol

Commit-ID:  2e9490ba5830a60a18a359192e938b2ad1710120
Gitweb:     https://git.kernel.org/tip/2e9490ba5830a60a18a359192e938b2ad1710120
Author:     Josh Poimboeuf <jpoimboe@...hat.com>
AuthorDate: Mon, 29 Jan 2018 22:00:41 -0600
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 30 Jan 2018 07:55:05 +0100

objtool: Warn on stripped section symbol

With the following fix:

  2a0098d70640 ("objtool: Fix seg fault with gold linker")

... a seg fault was avoided, but the original seg fault condition in
objtool wasn't fixed.  Replace the seg fault with an error message.

Suggested-by: Ingo Molnar <mingo@...nel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: David Woodhouse <dwmw2@...radead.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Guenter Roeck <linux@...ck-us.net>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Juergen Gross <jgross@...e.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/dc4585a70d6b975c99fc51d1957ccdde7bd52f3a.1517284349.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 tools/objtool/orc_gen.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
index e5ca314..e2c3b4b 100644
--- a/tools/objtool/orc_gen.c
+++ b/tools/objtool/orc_gen.c
@@ -98,6 +98,11 @@ static int create_orc_entry(struct section *u_sec, struct section *ip_relasec,
 	struct orc_entry *orc;
 	struct rela *rela;
 
+	if (!insn_sec->sym) {
+		WARN("missing symbol for section %s", insn_sec->name);
+		return -1;
+	}
+
 	/* populate ORC data */
 	orc = (struct orc_entry *)u_sec->data->d_buf + idx;
 	memcpy(orc, o, sizeof(*orc));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ