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>] [day] [month] [year] [list]
Date:	Fri, 6 May 2011 19:51:59 +0300
From:	Maxin John <maxin.john@...il.com>
To:	Russell King <linux@....linux.org.uk>
Cc:	Catalin Marinas <catalin.marinas@....com>,
	Phil Carmody <ext-phil.2.carmody@...ia.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Nicolas Pitre <nicolas.pitre@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] arm: kernel: module: Remove the r_offset check which is
 always false

Checking the unsigned 'r_offset' for less than zero will always be false.

Signed-off-by: Maxin B. John <maxin.john@...il.com>
---
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index fee7c36..fc74bd3 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -92,7 +92,7 @@ apply_relocate(Elf32_Shdr *sechdrs, const char
*strtab, unsigned int symindex,
                sym = ((Elf32_Sym *)symsec->sh_addr) + offset;
                symname = strtab + sym->st_name;

-               if (rel->r_offset < 0 || rel->r_offset >
dstsec->sh_size - sizeof(u32)) {
+               if (rel->r_offset > dstsec->sh_size - sizeof(u32)) {
                        pr_err("%s: section %u reloc %u sym '%s': out
of bounds relocation, offset %d size %u\n",
                               module->name, relindex, i, symname,
                               rel->r_offset, dstsec->sh_size);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ