public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug malloc/14483] obstack uses int for allocation sizes
Date: Mon, 04 Aug 2014 11:19:00 -0000 [thread overview]
Message-ID: <bug-14483-131-udKwesnGLf@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-14483-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=14483
--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Alan Modra from comment #3)
> Using int for sizes in the current obstack code is also a security breach, a
> buffer overflow on steroids. A default buffer of around 4k is seen as
> sufficiently large to write a 2G+ object.. This is true for both 32-bit and
> 64-bit targets.
>
> See https://sourceware.org/bugzilla/show_bug.cgi?id=17133
I think this is a bug in the caller, not in obstack. But it's an easy mistake
to make, and I consider the use of int for memory region sizes to be bad
practice which should be avoided. Unfortunately, it's difficult to change
legacy APIs.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2014-08-04 11:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 22:23 [Bug malloc/14483] New: " jsm28 at gcc dot gnu.org
2013-01-09 16:52 ` [Bug malloc/14483] " schwab@linux-m68k.org
2013-10-20 21:08 ` neleai at seznam dot cz
2014-06-17 18:36 ` fweimer at redhat dot com
2014-06-25 10:49 ` fweimer at redhat dot com
2014-07-24 7:01 ` amodra at gmail dot com
2014-08-04 11:19 ` fweimer at redhat dot com [this message]
2014-12-10 13:02 ` amodra at gmail dot com
2024-04-24 7:04 ` amodra at gmail dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-14483-131-udKwesnGLf@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).