public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/6919] posix_spawnattr_getschedparam overwrites unrelated memory
       [not found] <bug-6919-131@http.sourceware.org/bugzilla/>
@ 2014-07-02  7:18 ` fweimer at redhat dot com
  0 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-07-02  7:18 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

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

--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
I'm flagging this security- despite the out-of-bounds write.  The function is
rarely used.

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


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

* [Bug libc/6919] posix_spawnattr_getschedparam overwrites unrelated memory
  2008-09-27 18:34 [Bug libc/6919] New: " bruno at clisp dot org
                   ` (2 preceding siblings ...)
  2008-10-31 18:52 ` drepper at redhat dot com
@ 2008-11-02  0:56 ` bruno at clisp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: bruno at clisp dot org @ 2008-11-02  0:56 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bruno at clisp dot org  2008-11-02 00:55 -------
> I fixed the code bug by leaving the memcpy.  The compiler is smart enough.

The point about using an assignment rather than memcpy is that the compiler
would have reported this bug as an error already.
When you use an assignment, the compiler verifies that the source type and the
target type are the same. When you use memcpy, it doesn't.

Even excellent programmers occasionally make mistakes, like in this case. The
compiler can prevent you from making this kind of mistake.


-- 


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

------- 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] 5+ messages in thread

* [Bug libc/6919] posix_spawnattr_getschedparam overwrites unrelated memory
  2008-09-27 18:34 [Bug libc/6919] New: " bruno at clisp dot org
  2008-09-27 18:34 ` [Bug libc/6919] " bruno at clisp dot org
  2008-09-27 18:41 ` bruno at clisp dot org
@ 2008-10-31 18:52 ` drepper at redhat dot com
  2008-11-02  0:56 ` bruno at clisp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: drepper at redhat dot com @ 2008-10-31 18:52 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2008-10-31 18:51 -------
I fixed the code bug by leaving the memcpy.  The compiler is smart enough.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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

------- 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] 5+ messages in thread

* [Bug libc/6919] posix_spawnattr_getschedparam overwrites unrelated memory
  2008-09-27 18:34 [Bug libc/6919] New: " bruno at clisp dot org
  2008-09-27 18:34 ` [Bug libc/6919] " bruno at clisp dot org
@ 2008-09-27 18:41 ` bruno at clisp dot org
  2008-10-31 18:52 ` drepper at redhat dot com
  2008-11-02  0:56 ` bruno at clisp dot org
  3 siblings, 0 replies; 5+ messages in thread
From: bruno at clisp dot org @ 2008-09-27 18:41 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bruno at clisp dot org  2008-09-27 18:40 -------
Created an attachment (id=2965)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2965&action=view)
a fix

Attached is a fix. Like in the file spawnattr_setschedparam.c, a simple
assignment is sufficient - no need for memcpy at all.

Btw, you can also remove the include <string.h> from spawnattr_setschedparam.c.


-- 


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

------- 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] 5+ messages in thread

* [Bug libc/6919] posix_spawnattr_getschedparam overwrites unrelated memory
  2008-09-27 18:34 [Bug libc/6919] New: " bruno at clisp dot org
@ 2008-09-27 18:34 ` bruno at clisp dot org
  2008-09-27 18:41 ` bruno at clisp dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bruno at clisp dot org @ 2008-09-27 18:34 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bruno at clisp dot org  2008-09-27 18:33 -------
Created an attachment (id=2964)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2964&action=view)
test case


-- 


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

------- 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] 5+ messages in thread

end of thread, other threads:[~2014-07-02  7:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-6919-131@http.sourceware.org/bugzilla/>
2014-07-02  7:18 ` [Bug libc/6919] posix_spawnattr_getschedparam overwrites unrelated memory fweimer at redhat dot com
2008-09-27 18:34 [Bug libc/6919] New: " bruno at clisp dot org
2008-09-27 18:34 ` [Bug libc/6919] " bruno at clisp dot org
2008-09-27 18:41 ` bruno at clisp dot org
2008-10-31 18:52 ` drepper at redhat dot com
2008-11-02  0:56 ` bruno at clisp dot org

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