Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugtrack@alsa-project.org
To: alsa-devel@alsa-project.org
Subject: [ALSA - lib 0000675]: snd_output_buffer segfault
Date: Wed, 24 Nov 2004 15:00:29 +0100	[thread overview]
Message-ID: <7749a7e4d3e1518b03ea0b2217d3056f@bugtrack.alsa-project.org> (raw)


The following issue has been SUBMITTED.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=675> 
======================================================================
Reported By:                schottstaedt
Assigned To:                
======================================================================
Project:                    ALSA - lib
Issue ID:                   675
Category:                   general
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             11-24-2004 15:00 CET
Last Modified:              11-24-2004 15:00 CET
======================================================================
Summary:                    snd_output_buffer segfault
Description: 
In Alsa 1.0.6 (and 1.0.7 I think), snd_output_buffer_puts in
alsa-lib/src/output.c can write to memory it does not own,
causing segfaults in various unrelated later mallocs.  The
offending line is 280:

  result = vsnprintf(buffer->buf + buffer->size, size, format, args);

which should be:

  result = vsnprintf(buffer->buf + buffer->size, result, format, args);

There might not actually be "size" bytes available beyond
buffer->buf+buffer->size --
the preceding snd_output_buffer_need call only guaranteed "result" bytes.

Another similar bug reported by valgrind is in line 303:

	memcpy(buffer->buf + buffer->size, str, size);

where you actually have "err" bytes available, not "size".

And by the way, I really don't like this bug tracking
crap -- you should make it easy to report a bug.

======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
11-24-04 15:00 schottstaedt   New Issue                                    
======================================================================




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

             reply	other threads:[~2004-11-24 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-24 14:00 bugtrack [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-24 16:32 [ALSA - lib 0000675]: snd_output_buffer segfault bugtrack
2004-11-24 16:35 bugtrack
2004-12-27 14:50 bugtrack

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=7749a7e4d3e1518b03ea0b2217d3056f@bugtrack.alsa-project.org \
    --to=bugtrack@alsa-project.org \
    --cc=alsa-devel@alsa-project.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