Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp59024pxf; Tue, 9 Mar 2021 23:48:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYqFBTHperpho7fCD4zPuzQhN5XWwLqkiPw74fCfkPrwgCIfSbOiaqqsWkcSBVq5Lmsdnj X-Received: by 2002:a17:906:3488:: with SMTP id g8mr2204082ejb.282.1615362505961; Tue, 09 Mar 2021 23:48:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615362505; cv=none; d=google.com; s=arc-20160816; b=xuJKhBaIbDtJwAjKwSwB60WBPU5Lcv5n9KI8p6+P5d/XE9r5cJmZhVdj7iDHMa5DIl 3XiogXDMEDbHNaZAk/jZQPACH6oXRF+dssguGZVqxsTTks6aBJD8K+8I4QYPvpgZiMXV +NG7kgmz6uVwY5MSqtbfn3v1092+knGrtC1oIUISYabGkKJF5Fg8MMPPkhtYGMBYxO7/ NaELjAnUWgJKtXwSMztIos+0TC79CgnZFBGlme9napNndLglAwZbB0MY9H4+UotAZV2c NYvSa2FSPRmHJnI5vARqUub8Y13Da/3EuSSUlYJULn37go0iOy8hu6ZBgEFX9O4qMDNj hmuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YtSOPZCf9Da269ZEPcGrsyfquqgeGyegkCV8/Htilvk=; b=osRC4F3uLAXsS0s8neUDNW9nrnxIRDw6LjRDStyF1pm9uR3EZ67zD5SIkauj/LYWus 1iBFq24UcDltoKyEq6ziZEsEx8D9ubWxh1pI1O/H4/VcTCI7IOMzdvUYSBe4y2iiJVea ScsuWiHKIZCGjj/2w8R4qp8+pXMQbvCRaBcC3H/xCEDo53lYO4Fr6LVq0AMxWtt+D8tZ l10XpgYhYYbDJr17ysK3tfjYgYtFccExSYHXE/lzjwEE+x/K8N6dTEZ3KMfzvBSX5RF+ QtZGAo7OCwQKs0d2+JGSDMtEghqJjSz297kdM7a62Ane7gDYx1GMfnsfXTzbM8y9yXPq AMpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=R5gEY8Va; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lc20si7382080ejb.492.2021.03.09.23.48.03; Tue, 09 Mar 2021 23:48:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=R5gEY8Va; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230521AbhCJHqw (ORCPT + 99 others); Wed, 10 Mar 2021 02:46:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230198AbhCJHq2 (ORCPT ); Wed, 10 Mar 2021 02:46:28 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F54AC061761 for ; Tue, 9 Mar 2021 23:46:28 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id x7-20020a17090a2b07b02900c0ea793940so6767091pjc.2 for ; Tue, 09 Mar 2021 23:46:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YtSOPZCf9Da269ZEPcGrsyfquqgeGyegkCV8/Htilvk=; b=R5gEY8VaX1kw0BYeYWpOh2pvYK1+99hrZLVbBXAd3RwBgFjYc1B57PG7nhkaYE0mLc SXm6a1/sZRJ3lPzuMVqkrY91FHDPAe9Jscu5lh0y5zZmfoNOf7VeB8S4X77/Gr9e1ujv wuL7xpQ/EtRPPpp/f3fxRXxIVUJhTNkZFIIqM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YtSOPZCf9Da269ZEPcGrsyfquqgeGyegkCV8/Htilvk=; b=U6+0ons9W1LcdQDexdmp/KVQ25BBGFPTQvpA7VnfN8S3k62AouMtoDBOIpmkmc0qC1 VDHtAWY+jsIWKI6wo5yqBEKlQ4YRNsM4na3sZ4vodbYGRZejBepMr4O28N47D2QG5ZXZ pT4K8m4Pj+qHlKbPX+2JOSHvaDOQeKNgZBWjnLKaiqTGqaBRrpeXxuMntWG52Dsh4HRz ZyvUkwjN5OSYIV+9+CTjRXngknCQ/wPqBFa5nzkAEIrDzhN1xs1/ztgAs8ld/YSEs3t8 M9nke926UHbQFxre/aPOUO7OEU5amxSDQJ6o+dcOEo9CyGjrCrlZi1IMG93AR16Uqhdl HkNg== X-Gm-Message-State: AOAM530vuOG6dn+IUrvXU4+iTnAMURBVlTUY9EMtV3jC4gEQQaylJY7b S4Ki071ZVQQZs+Fb7zb/eOk51Q== X-Received: by 2002:a17:90a:8:: with SMTP id 8mr2313414pja.6.1615362387840; Tue, 09 Mar 2021 23:46:27 -0800 (PST) Received: from google.com ([2409:10:2e40:5100:30c3:e7ed:8b0a:7f01]) by smtp.gmail.com with ESMTPSA id n9sm1793181pjq.38.2021.03.09.23.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 23:46:27 -0800 (PST) Date: Wed, 10 Mar 2021 16:46:22 +0900 From: Sergey Senozhatsky To: Ricardo Ribalda Cc: Tomasz Figa , Marek Szyprowski , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , stable@vger.kernel.org Subject: Re: [PATCH] media: videobuf2: Fix integer overrun in vb2_mmap Message-ID: References: <20210310074028.1042475-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210310074028.1042475-1-ribalda@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (21/03/10 08:40), Ricardo Ribalda wrote: > > The plane_length is an unsigned integer. So, if we have a size of > 0xffffffff bytes we incorrectly allocate 0 bytes instead of 1 << 32. > > Suggested-by: Sergey Senozhatsky > Cc: stable@vger.kernel.org > Fixes: 7f8414594e47 ("[media] media: videobuf2: fix the length check for mmap") > Signed-off-by: Ricardo Ribalda FWIF, Reviewed-by: Sergey Senozhatsky