Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 143402
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Harlan Lieberman-Berg (RETIRED) <hlieberman@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 143402 depends on: 144412 Show dependency tree
Bug 143402 blocks:

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-08-09 16:32 0000
Copied from Full Disclosure: Thanks to Luigi Auriemma.
======
2) Bug
======

---------------------------------------------
A] buffer-overflow in reconnect's redirection
---------------------------------------------

The function which handles the HTTP connections is vulnerable to a
buffer-overflow that happens when it uses sscanf for copying the URL in
the Location's field received from the server into the redirect buffer
of only 1024 bytes declared in http_open.

>From reader/http/http.c:

static int reconnect (http_desc_t *desc, char *redirect)
{
    char request [2048];
    char response [10240];
    ...
    } else if (rc == 302) {
            s = strstr(response, "302");
        if (s) {
            //alsaplayer_error("%s", s);
            s = strstr(response, "Location: ");
            if (s && redirect) {
                /* Parse redirect */
                if (sscanf(s, "Location: %[^\r]", redirect)) {
                    /* alsaplayer_error("Redirection: %s", redirect); */
                }           
            }
            return 1;
        }
    ...


----------------------------------
B] buffer-overflow in GTK playlist
----------------------------------

A buffer-overflow exists in the functions which add items to the
playlist when the GTK interface is used (so the other interfaces are
not affected by this problem): new_list_item and CbUpdated in
interface/gtk/PlaylistWindow.cpp.
The best way for exploiting this bug is through the following URLs
(perfect, for example, if AlsaPlayer is the default player of the web
browser):

  http://aaaaa(more_than_1024_chars)aaaaa
or
  http://127.0.0.1/aaaaa(more_than_1024_chars)aaaaa.mp3


---------------------------------
C] buffer-overflow in cddb_lookup
---------------------------------

AlsaPlayer automatically queries the CDDB server specified in its
configuration (by default freedb.freedb.org) when the user choices the
CDDA function for playing audio CDs.
The function which queries the server uses a buffer of 20 bytes and one
of 9 for storing the category and ID strings received from the server
while the buffer which contains this server's response is 32768 bytes
long.
Naturally for exploiting this bug the attacker must have control of the
freedb server specified in the AlsaPlayer's configuration.

>From input/ccda/cdda_engine.c:

char * cddb_lookup (char *address, char *char_port, int discID, struct
cd_trk_list *tl)
{
    int port = atoi (char_port);
    int server_fd, i, j, n;
    int total_secs = 0, counter = 0;
    char *answer = NULL, *username, *filename, categ[20], newID[9];
    char msg[BUFFER_SIZE], offsets[BUFFER_SIZE], tmpbuf[BUFFER_SIZE];
    char hostname[MAXHOSTNAMELEN], server[80];
    ...
        /* copy the match to the category */
        j = 0;
        while (answer[i] != ' ') 
            categ[j++] = answer[i++];
        categ[j++] = '\0';

        /* copy the new cdID */
        j = 0; 
        i++;
        while (answer[i] != ' ') 
            newID[j++] = answer[i++];
        newID[j++] = '\0';
    }
    ...


===========
3) The Code
===========


http://aluigi.org/poc/alsapbof.zip

usage examples:
A] nc -l -p 80 -v -v -n < alsapbof_a.txt
B] alsaplayer http://`perl -e 'print "a"x2000'`
C] nc -l -p 888 -v -v -n < alsapbof_c.txt

------- Comment #1 From Sune Kloppenborg Jeppesen 2006-08-10 00:19:05 0000 -------
Sound please advise.

------- Comment #2 From Raphael Marichez 2006-08-11 06:56:45 0000 -------
i would say B2 ? 

------- Comment #3 From Harlan Lieberman-Berg (RETIRED) 2006-08-11 22:28:34 0000 -------
I'd concur with that. Setting to B2.

------- Comment #4 From Harlan Lieberman-Berg (RETIRED) 2006-08-16 17:02:04 0000 -------
Upstream appears to be dead. No CVS commits for 18 months. Secundia recommends
switching products. No activity on alsaplayer-devel.

Recommending removal from the tree (preferred) or hardmasking.

Thanks to tcort from Sound. =)

Removing sound@.

------- Comment #5 From Tim Yamin (RETIRED) 2006-08-16 17:14:39 0000 -------
Treecleaners: Please dispose of this dead corpse, er, I mean, ebuild ;)

------- Comment #6 From Raphael Marichez 2006-08-17 00:35:22 0000 -------
"Solution:
Use another product."

lol

i suggest masking this package

------- Comment #7 From Christian Heim (RETIRED) 2006-08-18 07:46:05 0000 -------
masked in package.mask and pending removal on September 15th, 2006

------- Comment #8 From Raphael Marichez 2006-08-18 08:04:02 0000 -------
thanks.

i suppose we should issue a GLSA for this one.

------- Comment #9 From Ian Ballantyne 2006-08-23 04:23:16 0000 -------
Sad to hear it's in such a state.  What would be necessary to prevent it's
removal from the tree?  

I've downloaded and applied the patches that are from the debian package and
are available on the alsaplayer developer mailing list at
http://lists.tartarus.org/pipermail/alsaplayer-devel/2006-May/001891.html and
everything appears to be OK.  Are these patches sufficient for the Gentoo team
to change their position about the removal of alsaplayer, or does there need to
be CVS commits?  

I ask because I find the alsaplayer to be a good lightweight player which I
like very much and would be very sadened to see it removed from the Gentoo
tree.

------- Comment #10 From Alec Warner 2006-08-23 05:49:07 0000 -------
http://www.gentoo-sunrise.org/sunrise

Feel free to put it there after it's removed here.  Otherwise, yes it needs a
maintainer.

------- Comment #11 From Sune Kloppenborg Jeppesen 2006-08-23 09:31:24 0000 -------
@sound do you still want to remove it or patch since one is now available?

------- Comment #12 From Raphael Marichez 2006-08-26 05:57:25 0000 -------
GLSA 200608-24

setting to enhancement scope for removal.

------- Comment #13 From Anders Rune Jensen (RETIRED) 2006-08-29 13:44:22 0000 -------
Has upstream been contacted regarding this issue? I would really like to see
this package stay in as it's a really nice audio library.

------- Comment #14 From Alec Warner 2006-08-29 13:56:41 0000 -------
(In reply to comment #13)
> Has upstream been contacted regarding this issue? I would really like to see
> this package stay in as it's a really nice audio library.
> 

See comment #4

------- Comment #15 From Diego E. 'Flameeyes' Pettenò 2006-08-30 07:13:49 0000 -------
I'd like to get this unmasked and patched, but i need a bit of time to update
myself after the forced 1 month downtime.

------- Comment #16 From Diego E. 'Flameeyes' Pettenò 2006-08-31 08:09:02 0000 -------
Using debian's patchset 8 I still get a segmentation fault for (A). I cannot
reproduce (C) right now as I have no clue how to change the freedb server. (B)
is not pertinent to us (no GTK interface anymore).

------- Comment #17 From David Fellows 2006-08-31 10:58:13 0000 -------
I did a cursory look through of the debian bugs descriptions /affected files.
Also the descriptions and affected files for this set of bugs.

The debian patches do not address the current bugs.

An attempt to fix these 3 bugs is on my todo list.

------- Comment #18 From Alec Warner 2006-09-15 14:47:24 0000 -------
17:48 <@antarus> Flameeyes: ping
17:48 <@Flameeyes> pong
17:48 <@antarus> Flameeyes: alsaplayer; it staying or going?
17:48 <@Flameeyes> antarus, going
17:48 <@antarus> Flameeyes: k

------- Comment #19 From Alec Warner 2006-09-18 22:05:33 0000 -------
Removed, Close at your leisure.

------- Comment #20 From Sune Kloppenborg Jeppesen 2006-09-18 22:26:50 0000 -------
Closing.

------- Comment #21 From Anders Rune Jensen (RETIRED) 2006-09-22 15:10:50 0000 -------
It seems the debian patchset 9 fixes this problem:

http://packages.debian.org/changelogs/pool/main/a/alsaplayer/alsaplayer_0.99.76-9/changelog

Does this change this in any way?

------- Comment #22 From Alec Warner 2006-09-22 16:45:00 0000 -------
(In reply to comment #21)
> It seems the debian patchset 9 fixes this problem:
> 
> http://packages.debian.org/changelogs/pool/main/a/alsaplayer/alsaplayer_0.99.76-9/changelog
> 
> Does this change this in any way?
> 

It's removed from the tree; so unless you can convince someone to bring it
back; no.

------- Comment #23 From Stuart Longland 2007-02-12 06:10:10 0000 -------
I only just noticed this package disappeared from the tree when I tried to
install an app that depends on it (Dancing Qt; not in portage tree yet).

Looking at the upstream site, it seems they've appointed new administrators,
and are looking into restarting the project.

What are people's thoughts about re-adding this to the tree?  I'm happy to
maintain it if the sound herd are reluctant.  The thing about this player, is
it's the only one I know of, that supports variable speed playback... I'm
involved with a Scottish country dance group here in Brisbane, who have a need
for such a facility... hence my interest in the package.

Anyway... thoughts people?

------- Comment #24 From Ryan Hill 2007-02-12 06:55:29 0000 -------
I'd like to see it back.  Bug #166464.

------- Comment #25 From Charlie Shepherd (RETIRED) 2007-02-13 01:39:29 0000 -------
(In reply to comment #23)
> The thing about this player, is
> it's the only one I know of, that supports variable speed playback...

I'm not too bothered whether it returns or not, but I believe mplayer already
supports this.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug