public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-apps/file/files: file-5.20-elf-note.patch
@ 2014-10-24 17:24 Mike Frysinger (vapier)
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger (vapier) @ 2014-10-24 17:24 UTC (permalink / raw
  To: gentoo-commits

vapier      14/10/24 17:24:09

  Added:                file-5.20-elf-note.patch
  Log:
  Add fix from upstream for ELF note parsing #526544 by Agostino Sarubbo.
  
  (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

Revision  Changes    Path
1.1                  sys-apps/file/files/file-5.20-elf-note.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/files/file-5.20-elf-note.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/file/files/file-5.20-elf-note.patch?rev=1.1&content-type=text/plain

Index: file-5.20-elf-note.patch
===================================================================
https://bugs.gentoo.org/526544

From 39c7ac1106be844a5296d3eb5971946cc09ffda0 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Fri, 17 Oct 2014 15:49:00 +0000
Subject: [PATCH] Fix note bounds reading, Francisco Alonso / Red Hat

---
 ChangeLog     | 4 ++++
 src/readelf.c | 9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

2014-10-17  11:48  Christos Zoulas <christos@zoulas.com>

	* fix bounds in note reading (Francisco Alonso / Red Hat)

diff --git a/src/readelf.c b/src/readelf.c
index 08f81f5..9ebdebd 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -477,6 +477,13 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
 	uint32_t namesz, descsz;
 	unsigned char *nbuf = CAST(unsigned char *, vbuf);
 
+	if (xnh_sizeof + offset > size) {
+		/*
+		 * We're out of note headers.
+		 */
+		return xnh_sizeof + offset;
+	}
+
 	(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
 	offset += xnh_sizeof;
 
-- 
2.1.2






^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-apps/file/files: file-5.20-elf-note.patch
@ 2015-01-27 12:36 Lars Wendler (polynomial-c)
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Wendler (polynomial-c) @ 2015-01-27 12:36 UTC (permalink / raw
  To: gentoo-commits

polynomial-c    15/01/27 12:36:12

  Removed:              file-5.20-elf-note.patch
  Log:
  Removed vulnerable versions
  
  (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-27 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 17:24 [gentoo-commits] gentoo-x86 commit in sys-apps/file/files: file-5.20-elf-note.patch Mike Frysinger (vapier)
  -- strict thread matches above, loose matches on Subject: below --
2015-01-27 12:36 Lars Wendler (polynomial-c)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox