Message ID | 20221122200841.1026335-1-butterflyhuangxx@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2418074wrr; Tue, 22 Nov 2022 12:12:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf4J4N9QiPCdsWSbpagSsyd1b9FuznuYiG88cenqkvNOiC4VRInqAv3kGKpf48Nwu9uW+8EM X-Received: by 2002:a50:ee96:0:b0:469:d815:6b09 with SMTP id f22-20020a50ee96000000b00469d8156b09mr5626128edr.288.1669147964355; Tue, 22 Nov 2022 12:12:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669147964; cv=none; d=google.com; s=arc-20160816; b=bKIwqG9mK0K0m4pm0QtIddZuFeoITeXbnBjqoos4l3XjOvztInRfgzDVMWX2lP9hj5 21ee5MNgmidCchttUP5z1WUTrrA/fYG0s7x19H5Q00YrIs5yjEAkMeJyEoy9zs6+LxRc 7Rmlz8BJaP/bu+4Zu6kZZvZcEvBsiMT/tn7+U1Sd/i4sPcVLbudUwIp5jGpN62uv1gI/ XqdqWqD3gzAiQzKiylhpi3qPGPXi/MknUHe+T2YmV7eB+5bQ58G43MUEbeV6LfkInq3T DHsP7vEPiuRj1tUeh0NQPzzP+s3DGIwgHbTCd4lnp0dX1JFossQOWmVKDLJi0/xA68fv 58NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sXUW0a6Ff8psj/R6aZYguKr5STKCT04i6o2Czkyr1nI=; b=qhxKcsZ/IhlIAoiSAt/gz47lZtnvYf04TAAJduGCCUEnjaA74j6yFinSwq+W+PxHit 4rcU/kiD//+v/vWeWMzV2fGPNSTfkeXoBujdiFcA02YWOjTUpsktt7q5ET2d9jXdVFHW eBQ+EV2ziPzqevO/wrfchRdbcT4pIzKXAM4/1niTvg0VFKVC1yJs62koMLv0S3ZREHYH dcRBaW6JfZ3Y+FrxXZ03zP8bMhXabTXnJPBP1bfm5h+zrQc21rv2hM6mFqFWc8L3VFW4 2XODq/fp1GlOh8puXveJkeh6/qoI171KPra1/28qvNT94RsVOEjSv4IEHWpSiX6AtCDY rkdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cl6HAHsy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a056402444100b00469f6d1a3c1si1317423edb.130.2022.11.22.12.12.18; Tue, 22 Nov 2022 12:12:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cl6HAHsy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234578AbiKVUJP (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Tue, 22 Nov 2022 15:09:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234718AbiKVUJC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 22 Nov 2022 15:09:02 -0500 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7A5EAFE73 for <linux-kernel@vger.kernel.org>; Tue, 22 Nov 2022 12:08:55 -0800 (PST) Received: by mail-lj1-x232.google.com with SMTP id x21so19127860ljg.10 for <linux-kernel@vger.kernel.org>; Tue, 22 Nov 2022 12:08:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sXUW0a6Ff8psj/R6aZYguKr5STKCT04i6o2Czkyr1nI=; b=cl6HAHsy3tjvvd4e4yK9SmzUE3tr+Gk6oNXpZw1qroE9OvLHrPAkJ7i2yJ+gyYrynr 3nX7GZat+e7v8Oj4Vj5/OxigiF2xNhYpwoB+U5NNn6egDKIc+cDavlJAOsqJirmlSJEa nVIVPLrOE00b08L3kFOA5w2X1R8VJ1YNfdJlvEzThE9ofWGO8evDtb9tN7+pK5o/qBYu Kj+VbqfXpOdWcrsoELjgX75ZRqLsxHvx/bcIjL7YNio+fE6TubHnAZa4g41q3X66KGO1 QM7EW+XeC2wdPzk5axmFu5e1KNzER+wDJcPqEz9RNjVlMDLBChG0M8HeYiugMbbUqklA CAWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sXUW0a6Ff8psj/R6aZYguKr5STKCT04i6o2Czkyr1nI=; b=p72AbCs3okB7HpNaWnA8c29oOkeJIrlit/u6JE/v59ob8U9D9y3eneQbhn1nyMQReW QkpLkaVjO6xFCxUMtTzdYAsh7fXWPJ6woaD9t5de5hrKDSHhUpeHTKdMey1b2aM0i5Kx t7bCNLvSPp2Qouh5m2WmxvM00/hyTdQa3ti2gdLEEIHdbgOevdjI1rUNOjqc3Fq2LRAb 7IH/u1gB3l6lC1GKux2PoFMQMEcEdprrVHoqqmVk48YV6asMWeiRUTbE92lxQ4zHSJ8L AC0L+5LrH78iY1Ad6ZFj9ibPm2MI3srA6ImyLv/rwHL/8CGzgVtiNZGdY/BkpiWGTWXT /vqg== X-Gm-Message-State: ANoB5pk2ucz9I51cwT7l/NZsXXHlWH55In3MNpBqMhYsNCJ5b8HxMbuz amXFvE16yVno3TUvp4PbmNLOvsl2Y8DOXWdy X-Received: by 2002:a2e:be04:0:b0:267:9d30:5ba with SMTP id z4-20020a2ebe04000000b002679d3005bamr7874525ljq.284.1669147734075; Tue, 22 Nov 2022 12:08:54 -0800 (PST) Received: from localhost.localdomain ([2.56.241.21]) by smtp.gmail.com with ESMTPSA id z19-20020a056512371300b004b4e6dab30esm59977lfr.222.2022.11.22.12.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 12:08:53 -0800 (PST) From: Xiaolong Huang <butterflyhuangxx@gmail.com> To: perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Xiaolong Huang <butterflyhuangxx@gmail.com> Subject: [PATCH] ALSA: rawmidi: fix infoleak in snd_rawmidi_ioctl_status_compat64 Date: Wed, 23 Nov 2022 04:08:41 +0800 Message-Id: <20221122200841.1026335-1-butterflyhuangxx@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750228495852308966?= X-GMAIL-MSGID: =?utf-8?q?1750228495852308966?= |
Series |
ALSA: rawmidi: fix infoleak in snd_rawmidi_ioctl_status_compat64
|
|
Commit Message
butt3rflyh4ck
Nov. 22, 2022, 8:08 p.m. UTC
The compat_status is declared off of the stack, so it needs to
be zeroed out before copied back to userspace to prevent any
unintentional data leakage.
Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com>
---
sound/core/rawmidi_compat.c | 1 +
1 file changed, 1 insertion(+)
base-commit: eb7081409f94a9a8608593d0fb63a1aa3d6f95d8
diff --git a/sound/core/rawmidi_compat.c b/sound/core/rawmidi_compat.c index 68a93443583c..6afa68165b17 100644 --- a/sound/core/rawmidi_compat.c +++ b/sound/core/rawmidi_compat.c @@ -80,6 +80,7 @@ static int snd_rawmidi_ioctl_status_compat64(struct snd_rawmidi_file *rfile, if (err < 0) return err; + memset(&compat_status, 0, sizeof(compat_status)); compat_status = (struct compat_snd_rawmidi_status64) { .stream = status.stream, .tstamp_sec = status.tstamp_sec,