From patchwork Tue May 9 14:42:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 98934 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1857656qge; Tue, 9 May 2017 07:43:45 -0700 (PDT) X-Received: by 10.99.114.3 with SMTP id n3mr554140pgc.130.1494341025233; Tue, 09 May 2017 07:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494341025; cv=none; d=google.com; s=arc-20160816; b=DlPMqXPc6PTYd0tf+xY7gdGjtayNLc9NG7zqfM61tMurMXxPLWNSxPZE3fMDmX47Fx vrx/6u28ICm0pC2FEbMoe8Lu5KGfIbwlCcjdgP/JPIZBHRGKxXv1dnE6bNJIg8xM8Drc RwATlli7BhH88NeO8avtyQ7pAyZ9TF4y3loPhkcDVB8dIwdGH/5UvA2MoJC6LeGi2Qhr XxOnAl//JNC1MpCmz/1gIa3qmWbnAZohnibKVXfHCWaL78o1WiocddSxNykP2J0rqwMg zeafoZldlzYZ3Qf5w6ZSLxuB3V3cGHJ1TdDMBbxGXpDLQnkGOCrUZSskndOOLa8aWfGW B1ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=HolqqrokPFRSuLjLA3po0mTiTh7f3TMsyXvMsSgDpsY=; b=gbSld5dqX6tu7YeHxDBnps/I7VSJVIEUBqiC7MuVp+N/TDP2wJmOd3kr/EkspGgFzn yGDFoaxu1jxWVqVtVqyolwn0F8YZw39Xx5nWwcCDCnN+lIl9IvEO06FPh4UDkqSDNGg7 iNvoADTmjx867NdB1bH9wvzX+/rdqjOItfhDP2QJaGpT0rOiNxLLoOmVyGs0rQHfx5Ga Xlq3yrqqoNMFHtHtADLHIfAXv0yfszmLQJ+xeiSOUEXl2fWFcck0kcRf4/YAKpAKes4+ xdQkvQCi7kpbXGNyFO2W39+bY1AdVZY/V11x0AOwkt4onkZoLuKHadoSI8+Lk8F+E+/U tycg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si99892pli.322.2017.05.09.07.43.45; Tue, 09 May 2017 07:43:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754176AbdEIOno (ORCPT + 6 others); Tue, 9 May 2017 10:43:44 -0400 Received: from mail-pg0-f46.google.com ([74.125.83.46]:33288 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754143AbdEIOnn (ORCPT ); Tue, 9 May 2017 10:43:43 -0400 Received: by mail-pg0-f46.google.com with SMTP id u187so790628pgb.0 for ; Tue, 09 May 2017 07:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HolqqrokPFRSuLjLA3po0mTiTh7f3TMsyXvMsSgDpsY=; b=Zp0pWxxtcmYS01RfsigqTbAlvDhFbImTdng/vM2dsRelrDKw60WncGCSBUPIZMa+tS CyiE4K4Vb8Q3epX+Q3uoEjI8ZsWRRb3i8m56jS7b+XPzDuSW3YoB/2d0L/yXw3QMJnmC PQCrG5RqGO4Krthr7ZEI7ODy9JQ0lHfYpuvPo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HolqqrokPFRSuLjLA3po0mTiTh7f3TMsyXvMsSgDpsY=; b=E5fA7e+UodXTtZwRe3GB2Kbk/iCkBpIZ7udMv3KMw5vlXdFaXsOtAguHo9adwHX4/4 zlpZReuH6Unxe6e30/CZ4U1Zv+l9lzWrqKi2mCFcn6s85JhIHp/QhlS0wq/sXM2IuvGq wjM4HGx8MNcP65lqt4Za6IK1VNHbYrl73OAyPdzZSgOZHUPgAT0Bex8pwc6KvRiKjiO3 991D25N+UEd9JoQKPVN4nCSxrqySBzmLdfo1jQmrHkqWOCsWeiHLMFKwjs0VJmnQSOC9 msS7c8+3BhKeAwsWm9OSTZEhrYHx8Vvu0gNRj1KhbfPSAwHcm9axV/gg5CCG5MaPKM2g E9GA== X-Gm-Message-State: AODbwcAMOOwmyOShN0ancjcBHa7s/u0Dm+cJvRsfkJNY8pOi5cvtHdvQ H04YvpDAt3becoNAMn/eQzv3 X-Received: by 10.99.139.195 with SMTP id j186mr552985pge.134.1494341023287; Tue, 09 May 2017 07:43:43 -0700 (PDT) Received: from localhost.localdomain ([106.51.135.126]) by smtp.gmail.com with ESMTPSA id 11sm341811pfj.59.2017.05.09.07.43.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 May 2017 07:43:42 -0700 (PDT) From: Amit Pundir To: Greg KH Cc: stable@vger.kernel.org, Kangjie Lu , Kangjie Lu , Takashi Iwai Subject: [PATCH for-3.18 21/24] ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt Date: Tue, 9 May 2017 20:12:45 +0530 Message-Id: <1494340968-17152-22-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494340968-17152-1-git-send-email-amit.pundir@linaro.org> References: <1494340968-17152-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Kangjie Lu commit e4ec8cc8039a7063e24204299b462bd1383184a5 upstream. The stack object “r1” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized. Signed-off-by: Kangjie Lu Signed-off-by: Takashi Iwai Signed-off-by: Amit Pundir --- sound/core/timer.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/sound/core/timer.c b/sound/core/timer.c index 47c8beb5eb40..d448437df4b5 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1295,6 +1295,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri, } if ((tu->filter & (1 << SNDRV_TIMER_EVENT_RESOLUTION)) && tu->last_resolution != resolution) { + memset(&r1, 0, sizeof(r1)); r1.event = SNDRV_TIMER_EVENT_RESOLUTION; r1.tstamp = tstamp; r1.val = resolution;