From patchwork Fri Apr 22 20:12:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leann Ogasawara X-Patchwork-Id: 92581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 174DF1007DC for ; Sat, 23 Apr 2011 06:13:06 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QDMip-00046R-LH; Fri, 22 Apr 2011 20:12:59 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QDMin-00045J-Ss for kernel-team@lists.ubuntu.com; Fri, 22 Apr 2011 20:12:57 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QDMin-00018s-Ps for ; Fri, 22 Apr 2011 20:12:57 +0000 Received: from c-76-105-148-120.hsd1.or.comcast.net ([76.105.148.120] helo=[192.168.1.4]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QDMin-0000cb-EP for kernel-team@lists.ubuntu.com; Fri, 22 Apr 2011 20:12:57 +0000 Subject: [Hardy CVE-2011-0712] ALSA: caiaq - Fix possible string-buffer overflow, CVE-2011-0712 From: Leann Ogasawara To: kernel-team Date: Fri, 22 Apr 2011 13:12:53 -0700 Message-ID: <1303503173.2050.31.camel@emiko> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com The following changes since commit a9db1134ee83026cf7ff4e192785c436d4573bad: Steve Conklin (1): UBUNTU: Ubuntu-2.6.24-29.89 are available in the git repository at: git://kernel.ubuntu.com/ogasawara/ubuntu-hardy.git CVE-2011-0712 Takashi Iwai (1): ALSA: caiaq - Fix possible string-buffer overflow, CVE-2011-0712 sound/usb/caiaq/caiaq-audio.c | 2 +- sound/usb/caiaq/caiaq-device.c | 4 ++-- sound/usb/caiaq/caiaq-midi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) From 211f02c1eadb3c00bc59a20fdf24e9ac8a026326 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 14 Feb 2011 22:45:59 +0100 Subject: [PATCH] ALSA: caiaq - Fix possible string-buffer overflow, CVE-2011-0712 BugLink: http://bugs.launchpad.net/bugs/768448 CVE-2011-0712 Use strlcpy() to assure not to overflow the string array sizes by too long USB device name string. Reported-by: Rafa Cc: stable Signed-off-by: Takashi Iwai (backported from upstream commit eaae55dac6b64c0616046436b294e69fc5311581) Signed-off-by: Leann Ogasawara Acked-by: Brad Figg Acked-by: Tim Gardner --- sound/usb/caiaq/caiaq-audio.c | 2 +- sound/usb/caiaq/caiaq-device.c | 4 ++-- sound/usb/caiaq/caiaq-midi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/usb/caiaq/caiaq-audio.c b/sound/usb/caiaq/caiaq-audio.c index 0666908..5e1aeac 100644 --- a/sound/usb/caiaq/caiaq-audio.c +++ b/sound/usb/caiaq/caiaq-audio.c @@ -636,7 +636,7 @@ int __devinit snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev) } dev->pcm->private_data = dev; - strcpy(dev->pcm->name, dev->product_name); + strlcpy(dev->pcm->name, dev->product_name, sizeof(dev->pcm->name)); memset(dev->sub_playback, 0, sizeof(dev->sub_playback)); memset(dev->sub_capture, 0, sizeof(dev->sub_capture)); diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c index 58af814..78b74c3 100644 --- a/sound/usb/caiaq/caiaq-device.c +++ b/sound/usb/caiaq/caiaq-device.c @@ -361,8 +361,8 @@ static int init_card(struct snd_usb_caiaqdev *dev) if (c) *c = '\0'; - strcpy(card->driver, MODNAME); - strcpy(card->shortname, dev->product_name); + strlcpy(card->driver, MODNAME, sizeof(card->driver)); + strlcpy(card->shortname, dev->product_name, sizeof(card->shortname)); len = snprintf(card->longname, sizeof(card->longname), "%s %s (serial %s, ", diff --git a/sound/usb/caiaq/caiaq-midi.c b/sound/usb/caiaq/caiaq-midi.c index 793ca20..1c14ba9 100644 --- a/sound/usb/caiaq/caiaq-midi.c +++ b/sound/usb/caiaq/caiaq-midi.c @@ -137,7 +137,7 @@ int __devinit snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *device) if (ret < 0) return ret; - strcpy(rmidi->name, device->product_name); + strlcpy(rmidi->name, device->product_name, sizeof(rmidi->name)); rmidi->info_flags = SNDRV_RAWMIDI_INFO_DUPLEX; rmidi->private_data = device;