mainGnuTLS - Support: sr #107604, use-after-free in cdk_stream_read()

 
 

sr #107604: use-after-free in cdk_stream_read()

Submitter:  Vitaly Kruglikov <vitalyk>
Submitted:  Sat 26 Feb 2011 02:24:59 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  4 - Important Status:  Done
Privacy:  Public Assigned to:  nmav
Open/Closed:  Closed Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 26 Mar 2011 12:10:55 AM UTC, comment #1: 

A fix has been commited.

Nikos Mavrogiannopoulos <nmav>
Group administrator
Sat 26 Feb 2011 02:24:59 AM UTC, original submission:  

(Access to freed memory location could be a security issue)

On v2.10.4:

>>

931      int
932      cdk_stream_read (cdk_stream_t s, void *buf, size_t buflen)
933      {

...


959            rc = stream_filter_read (s);
At conditional (1): "rc" taking true path
960            if (rc)
961              {
962                s->error = rc;
Event deref_arg: Dereferencing freed pointer "s->fp" in call to function "feof"
963                if (feof (s->fp))
<<

stream_filter_read() could free/close s->fp by calling stream_fp_replace(), but then calls "feof (s->fp)" on error.  If "fclose (s->fp)" call from stream_fp_replace() fails, then s->fp could possibly be deleted upon return, but then accessed by the above "feof (s->fp)" call

Vitaly Kruglikov <vitalyk>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nmav (Posted a comment)
  • -email is unavailable- added by vitalyk (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-03-26 nmav StatusNone Done
        Assigned toNone nmav
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code