Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1628396pxp; Thu, 17 Mar 2022 13:05:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8i4zSFRWXQrzi3Kzrcoj4fbiqQnMKV4Zj6mJxHI7aBpNyrzdOCG9ThJ3hGLTv6SbuMS++ X-Received: by 2002:a17:90a:8582:b0:1b9:b0da:9ca9 with SMTP id m2-20020a17090a858200b001b9b0da9ca9mr7287192pjn.146.1647547511667; Thu, 17 Mar 2022 13:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647547511; cv=none; d=google.com; s=arc-20160816; b=Xqxl2x7PKQ241nigTpEUd2GFZJAu8YjXb0GhjzlrlwKBkVLjx1t+QFsxmmfcxCxlNN RMG3b67ERtobHEcORIDAUOouCoBLsIeci9Yb2M5CdzJOOA+AQTBE/lgmUvXNG5sfqFzn y+WBCCGbHDgbjJCZhr25LclR4okwmG8AvGQCh8lxUZqKVPdsNu8RPutAzdKrbpjnmXYA Y4vKv975UTw8qvNFhtpuOXR57OCZdSFGEGybz2UhI8HMKpqKRjmZlO9jA4Oc26Mi+FkN S7vR1AqNoaESdErS/n4w8LepTGAdE9JXC0E3/jfv4W7aoe10mTpLn8fxc4simKCKEIRG wl6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KNUNjaBCVasZfpBbOFNsbgHTLCGoLifuHLYmJKwlzBE=; b=U0m0NVURGBvhNIebKJ0vNEnp+LBDLZh7blBqpOb5jut4JcJpDUKcJPRrG76YPo7VC1 hTNAXHUwJBwavFV1DFgRvyuPEhvb4FgE+ngaqb/ylqdKntkVk7+s50clLIS9WS1+Fiff KKrKF6GKO1lYtrdBe0IwjsNa2x6dY5q/0jMY+GzZUKhL5X9TDsaox8VLqBpqIijH/7zJ txVUs+XxpPNkuITFvFYh6LPyvUelM08B+V355KdaB4RsfK9HmMQCmLbHGv4a9/dg/Fc2 sBmDHGqERkE8Z+S6p/E8zGy49eFYfm3hy6QDQWQvMhrJwe90P34bk/+UswsI7tW8LHPN 468g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=HeYHtJ7L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q194-20020a632acb000000b003816043f125si2981911pgq.794.2022.03.17.13.05.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=HeYHtJ7L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 01FFF240584; Thu, 17 Mar 2022 12:53:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232164AbiCQS61 (ORCPT + 99 others); Thu, 17 Mar 2022 14:58:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237760AbiCQS56 (ORCPT ); Thu, 17 Mar 2022 14:57:58 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43E88165A8F for ; Thu, 17 Mar 2022 11:56:41 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id bt26so10573491lfb.3 for ; Thu, 17 Mar 2022 11:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KNUNjaBCVasZfpBbOFNsbgHTLCGoLifuHLYmJKwlzBE=; b=HeYHtJ7Lk2fsSlITrtcBvb02gBAgV1u/Sz4/x831laGr7/psVM2Vbs9QGHfqxX8ulj ETvly1hrDFAdBIkS6/pnOGOojuIuqFayBbrVkJA2Yg34jQUErKO5bfvQC8X7c1+Ld0U9 QrOOBvFDNRMZ8/V6mj/D7xyEVdr1YXu71Zhpk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KNUNjaBCVasZfpBbOFNsbgHTLCGoLifuHLYmJKwlzBE=; b=dnH9+vkf0kcfFlCHcxv2T+QMRocMcUz0xxKL0Z2zYyhcZAHBWoIXcqvys0RSd5mTS3 aJm6uHbVvfn7Yvk4bk0odYaEVis7zfCb2yrzDhnIUmE8l133Ej0Nw0b/TYJwNFT+xtKG JEs9S0HhM4jZ9rVO5WikJ0tC1k2/uPupCqw2ETk66ebHHlTa6IgPxWk0BnZsgwYsZT3/ RxJO4MylHgDZKqsugm37uK3atJy1ZDd83SFEEYjQk/9KVKnAc/tLj075p3lHFYKubSjP p8BYaJLxbAGrvsbvsJh/ENMbO672cAmWr2UC4LYf+34H7URiEqlH43MdG84jSqqytzOD fNSg== X-Gm-Message-State: AOAM533rcRUxL2s7y8IZ7+f0LbOJUDayRJMxjALxGz0JBASO+eudxGtW +7jgLHDgRNQ3AhNhRJLcMJVHdBn8k8zxJLPS X-Received: by 2002:a05:6512:2614:b0:445:777d:3530 with SMTP id bt20-20020a056512261400b00445777d3530mr3806059lfb.647.1647543399271; Thu, 17 Mar 2022 11:56:39 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id t22-20020a199116000000b004486eef2bdesm507501lfd.272.2022.03.17.11.56.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Mar 2022 11:56:38 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id s25so8486482lji.5 for ; Thu, 17 Mar 2022 11:56:36 -0700 (PDT) X-Received: by 2002:a2e:804b:0:b0:247:e81f:87e9 with SMTP id p11-20020a2e804b000000b00247e81f87e9mr4044603ljg.176.1647543396246; Thu, 17 Mar 2022 11:56:36 -0700 (PDT) MIME-Version: 1.0 References: <00000000000085b1b305da5a66f3@google.com> In-Reply-To: From: Linus Torvalds Date: Thu, 17 Mar 2022 11:56:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [syzbot] WARNING: kmalloc bug in snd_pcm_plugin_alloc (2) To: Takashi Iwai Cc: syzbot , Jaroslav Kysela , Takashi Iwai , Andrew Morton , alsa-devel@alsa-project.org, Linux Kernel Mailing List , Linux-MM , syzkaller-bugs , Willy Tarreau Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 17, 2022 at 7:13 AM Takashi Iwai wrote: > > And, we want not only avoiding the overflow but also limiting the > actual size, too. Practically seen, more than 1MB temporary buffer is > unrealistic, and better to bail if more than that is requested. Looks sane to me, although I obviously can't judge how well that 1M limit works since I don't know the uses. Thanks, Linus