public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/5945] New: regoff_t wrong has posix type
@ 2008-03-16 14:02 vik at forgottenroots dot de
  2008-03-30  4:31 ` [Bug regex/5945] " drepper at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: vik at forgottenroots dot de @ 2008-03-16 14:02 UTC (permalink / raw)
  To: glibc-bugs-regex

The type regoff_t should hold at least the same amount of bytes as off_t and
ssize_t 
here: http://www.opengroup.org/onlinepubs/009695399/basedefs/regex.h.html
It's defined in regex.h as 'int` so it won't hold off_t on a 64bit machine or a
32bit machine where off_t 64bit support is enabled (#define _FILE_OFFSET_BITS 64)

-- 
           Summary: regoff_t wrong has posix type
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: regex
        AssignedTo: drepper at redhat dot com
        ReportedBy: vik at forgottenroots dot de
                CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
                    bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=5945

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug regex/5945] regoff_t wrong has posix type
  2008-03-16 14:02 [Bug regex/5945] New: regoff_t wrong has posix type vik at forgottenroots dot de
@ 2008-03-30  4:31 ` drepper at redhat dot com
  2008-08-18 10:10 ` bonzini at gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: drepper at redhat dot com @ 2008-03-30  4:31 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From drepper at redhat dot com  2008-03-30 04:30 -------
This is known but obviously cannot easily be fixed.  Suspended until somebody
takes this serious to actually take a stab at a solution.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


http://sourceware.org/bugzilla/show_bug.cgi?id=5945

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug regex/5945] regoff_t wrong has posix type
  2008-03-16 14:02 [Bug regex/5945] New: regoff_t wrong has posix type vik at forgottenroots dot de
  2008-03-30  4:31 ` [Bug regex/5945] " drepper at redhat dot com
@ 2008-08-18 10:10 ` bonzini at gnu dot org
  2008-08-18 14:05 ` drepper at redhat dot com
  2010-09-09 15:44 ` bonzini at gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: bonzini at gnu dot org @ 2008-08-18 10:10 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From bonzini at gnu dot org  2008-08-18 10:09 -------
You mean, it cannot be easily fixed because it breaks the ABI?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5945

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug regex/5945] regoff_t wrong has posix type
  2008-03-16 14:02 [Bug regex/5945] New: regoff_t wrong has posix type vik at forgottenroots dot de
  2008-03-30  4:31 ` [Bug regex/5945] " drepper at redhat dot com
  2008-08-18 10:10 ` bonzini at gnu dot org
@ 2008-08-18 14:05 ` drepper at redhat dot com
  2010-09-09 15:44 ` bonzini at gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: drepper at redhat dot com @ 2008-08-18 14:05 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From drepper at redhat dot com  2008-08-18 14:04 -------
(In reply to comment #2)
> You mean, it cannot be easily fixed because it breaks the ABI?

Yes.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5945

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug regex/5945] regoff_t wrong has posix type
  2008-03-16 14:02 [Bug regex/5945] New: regoff_t wrong has posix type vik at forgottenroots dot de
                   ` (2 preceding siblings ...)
  2008-08-18 14:05 ` drepper at redhat dot com
@ 2010-09-09 15:44 ` bonzini at gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: bonzini at gnu dot org @ 2010-09-09 15:44 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From bonzini at gnu dot org  2010-09-09 15:44 -------
On bug-gnulib, the following suggestion was made by Bruno Haible:

> [glibc could] offer some preprocessor macro that makes regoff_t 64-bit wide -
> like it was done for off_t.
> 
> Would glibc need to export additional symbols for this? Yes.
> 
> Would a compiled glibc need to contain two copies of the regex code? No, the
> 32-bit version could be a thin wrapper around the 64-bit version.

I guess this would count as "somebody takes this serious to actually take a stab
at a solution".  Would _REGEX_OFFSET_BITS be okay for you as a macro?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5945

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug regex/5945] regoff_t wrong has posix type
       [not found] <bug-5945-132@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-06-27 13:08 ` fweimer at redhat dot com
@ 2015-06-25 16:50 ` filbranden at google dot com
  4 siblings, 0 replies; 10+ messages in thread
From: filbranden at google dot com @ 2015-06-25 16:50 UTC (permalink / raw)
  To: glibc-bugs-regex

https://sourceware.org/bugzilla/show_bug.cgi?id=5945

Filipe Brandenburger <filbranden at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |filbranden at google dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug regex/5945] regoff_t wrong has posix type
       [not found] <bug-5945-132@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-02-08  2:32 ` bugdal at aerifal dot cx
@ 2014-06-27 13:08 ` fweimer at redhat dot com
  2015-06-25 16:50 ` filbranden at google dot com
  4 siblings, 0 replies; 10+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 13:08 UTC (permalink / raw)
  To: glibc-bugs-regex

https://sourceware.org/bugzilla/show_bug.cgi?id=5945

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug regex/5945] regoff_t wrong has posix type
       [not found] <bug-5945-132@http.sourceware.org/bugzilla/>
  2011-06-17 10:43 ` bonzini at gnu dot org
  2013-02-08  1:52 ` eggert at gnu dot org
@ 2013-02-08  2:32 ` bugdal at aerifal dot cx
  2014-06-27 13:08 ` fweimer at redhat dot com
  2015-06-25 16:50 ` filbranden at google dot com
  4 siblings, 0 replies; 10+ messages in thread
From: bugdal at aerifal dot cx @ 2013-02-08  2:32 UTC (permalink / raw)
  To: glibc-bugs-regex

http://sourceware.org/bugzilla/show_bug.cgi?id=5945

--- Comment #7 from Rich Felker <bugdal at aerifal dot cx> 2013-02-08 02:32:02 UTC ---
Yes, thanks for updating/clarifying that. Is there any chance of this ever
getting fixed? I suspect there may even be obscure vulnerabilities related to
this, if you can somehow pass a string longer than 4gb to regexec and cause the
matches to get truncated, and thus for the caller to either dereference memory
at a negative offset, exposing data it should not, or treating non-matching
data early in the string as a match.

Obviously these could be closed by making the interface even more
non-conforming and rejecting offsets that would overflow, but I think the
proper solution is to add a versioned symbol and fix the type.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug regex/5945] regoff_t wrong has posix type
       [not found] <bug-5945-132@http.sourceware.org/bugzilla/>
  2011-06-17 10:43 ` bonzini at gnu dot org
@ 2013-02-08  1:52 ` eggert at gnu dot org
  2013-02-08  2:32 ` bugdal at aerifal dot cx
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: eggert at gnu dot org @ 2013-02-08  1:52 UTC (permalink / raw)
  To: glibc-bugs-regex

http://sourceware.org/bugzilla/show_bug.cgi?id=5945

Paul Eggert <eggert at gnu dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eggert at gnu dot org

--- Comment #6 from Paul Eggert <eggert at gnu dot org> 2013-02-08 01:51:43 UTC ---
The original bug report is old, and POSIX has changed in the meantime: regoff_t
is now required to be at least as large as ptrdiff_t and ssize_t. (Previously
this was off_t and ssize_t.)  See:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/regex.h.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug regex/5945] regoff_t wrong has posix type
       [not found] <bug-5945-132@http.sourceware.org/bugzilla/>
@ 2011-06-17 10:43 ` bonzini at gnu dot org
  2013-02-08  1:52 ` eggert at gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: bonzini at gnu dot org @ 2011-06-17 10:43 UTC (permalink / raw)
  To: glibc-bugs-regex

http://sourceware.org/bugzilla/show_bug.cgi?id=5945

Paolo Bonzini <bonzini at gnu dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #5 from Paolo Bonzini <bonzini at gnu dot org> 2011-06-17 10:41:59 UTC ---
*** Bug 12900 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2015-06-25 16:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-16 14:02 [Bug regex/5945] New: regoff_t wrong has posix type vik at forgottenroots dot de
2008-03-30  4:31 ` [Bug regex/5945] " drepper at redhat dot com
2008-08-18 10:10 ` bonzini at gnu dot org
2008-08-18 14:05 ` drepper at redhat dot com
2010-09-09 15:44 ` bonzini at gnu dot org
     [not found] <bug-5945-132@http.sourceware.org/bugzilla/>
2011-06-17 10:43 ` bonzini at gnu dot org
2013-02-08  1:52 ` eggert at gnu dot org
2013-02-08  2:32 ` bugdal at aerifal dot cx
2014-06-27 13:08 ` fweimer at redhat dot com
2015-06-25 16:50 ` filbranden at google dot com

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).