From nobody@FreeBSD.org  Sat Nov  1 03:08:16 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F097C106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Nov 2008 03:08:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id DD48B8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Nov 2008 03:08:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mA138G5V090590
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 1 Nov 2008 03:08:16 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mA138GE6090589;
	Sat, 1 Nov 2008 03:08:16 GMT
	(envelope-from nobody)
Message-Id: <200811010308.mA138GE6090589@www.freebsd.org>
Date: Sat, 1 Nov 2008 03:08:16 GMT
From: bf <bf2006a@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH]audio/faad: fix buffer overflow in command-line frontend
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         128512
>Category:       ports
>Synopsis:       [PATCH]audio/faad: fix buffer overflow in command-line frontend
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 01 03:10:00 UTC 2008
>Closed-Date:    Wed Nov 12 16:31:38 UTC 2008
>Last-Modified:  Wed Nov 12 16:40:01 UTC 2008
>Originator:     bf
>Release:        7-STABLE i386
>Organization:
-
>Environment:
>Description:
Add an upstream patch for CVE-2008-4201, and bump portrevision:

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4201
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN faad.orig/Makefile faad/Makefile
--- faad.orig/Makefile	2008-08-21 02:16:16.000000000 -0400
+++ faad/Makefile	2008-09-30 03:22:44.810871000 -0400
@@ -7,6 +7,7 @@
 
 PORTNAME=	faad2
 PORTVERSION=	2.6.1
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	audio
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
diff -ruN faad.orig/files/patch-frontend_main.c faad/files/patch-frontend_main.c
--- faad.orig/files/patch-frontend_main.c	1969-12-31 19:00:00.000000000 -0500
+++ faad/files/patch-frontend_main.c	2008-09-30 03:29:10.586802000 -0400
@@ -0,0 +1,17 @@
+--- frontend/main.c.orig	2007-11-01 13:33:30.000000000 -0700
++++ frontend/main.c	2008-09-16 11:01:40.000000000 -0700
+@@ -911,12 +911,14 @@
+             if (sampleId == 0) dur = 0;
+ 
+             if (useAacLength || (timescale != samplerate)) {
+                 sample_count = frameInfo.samples;
+             } else {
+                 sample_count = (unsigned int)(dur * frameInfo.channels);
++                if (sample_count > frameInfo.samples)
++                    sample_count = frameInfo.samples;
+ 
+                 if (!useAacLength && !initial && (sampleId < numSamples/2) && (sample_count != frameInfo.samples))
+                 {
+                     faad_fprintf(stderr, "MP4 seems to have incorrect frame duration, using values from AAC data.\n");
+                     useAacLength = 1;
+                     sample_count = frameInfo.samples;


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-multimedia 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Nov 1 03:10:12 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128512 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Wed Nov 12 16:31:04 UTC 2008 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128512 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/128512: commit references a PR
Date: Wed, 12 Nov 2008 16:31:41 +0000 (UTC)

 pav         2008-11-12 16:31:27 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/faad           Makefile 
   Added files:
     audio/faad/files     patch-frontend_main.c 
   Log:
   - Fix a heap-based buffer overflow in the command-line frontend. It allows
     remote attackers to cause a denial of service (crash) and possibly execute
     arbitrary code via a crafted MPEG-4 (MP4) file.
   
   PR:             ports/128512
   Submitted by:   bf <bf2006a@yahoo.com>
   Security:       http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4201
   
   Revision  Changes    Path
   1.51      +1 -0      ports/audio/faad/Makefile
   1.1       +17 -0     ports/audio/faad/files/patch-frontend_main.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
