Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1120297img; Thu, 28 Feb 2019 13:25:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzV30hSXm+sZbtdcXhODf4WXaz/dZPKDh48f36avudtnuP+ktVkaJy0MFKStq+rAydAJRUG X-Received: by 2002:a17:902:9a09:: with SMTP id v9mr1475465plp.225.1551389117654; Thu, 28 Feb 2019 13:25:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551389117; cv=none; d=google.com; s=arc-20160816; b=ym0rYZFGwuEVbbHrtaerDEocf4BPK/dVhsnV+L7PTj53pdH05eH7BXcSJWj5dKgyh/ 6nUoZWw+5t7ArYC4zQ/ox9EKNWEDX/uOPTTwnFVD6D+azv7+jGzZL/tne7KIW50tijor dnVvtPSr/2lvIvB5gOb3DSTZ5AxQixspflGYQkaBxBO+fvtjnEO20WRxIIz++Kev38FG u8WUA7tcn8pSwLulGBh88s0YG+AoSy+b3JVGADaGwLL5+SlmTEdTVSDu4Q9yp2SuYN87 zoJ+V9J9Fnr8gn2rq2F8k3QQHtUznQFhXAthQT053vnTRHDeFVU/m/+hrbM43Lvr88bG 561w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=0rnACV3hbRWsqpW2HE8Ikf+ekHji4cbWGZSHPV64ldU=; b=ilSDOILfSk1WpfEeNTB9GpOk1pHKhPTY+0D4g9fUyWMog+1bpc/bGOZv/6eth7lu6h drBlyeVKs0+UrReWkHU1ubWcovRjZmp2DvUICEUqfp6K9WlXL+Ii3DRlfz71tuAp6uXs W/ICnPLi8IGm63cz5P/32+aCw99HJilwT7tPk4E4dX0bl6CR27oipVbK4nKGQjeHgUn6 biJN9c0/sMo0sYE43ymAmbVggEbm7TxSCPBlLi9IaVbNSJzd1lp7KGts5HV38ngepL+Z cNMg231ivw5MdUzZ0RfzeYYIZUKCr+oBdq/v128px2bUP5D9kpZFQMHXC86NGP+6Gzzs 9HWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g4ffMHZj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si18562236plo.206.2019.02.28.13.25.00; Thu, 28 Feb 2019 13:25:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=g4ffMHZj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1732018AbfB1TBb (ORCPT + 99 others); Thu, 28 Feb 2019 14:01:31 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:46787 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727165AbfB1TB2 (ORCPT ); Thu, 28 Feb 2019 14:01:28 -0500 Received: by mail-qt1-f195.google.com with SMTP id z25so24754473qti.13; Thu, 28 Feb 2019 11:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0rnACV3hbRWsqpW2HE8Ikf+ekHji4cbWGZSHPV64ldU=; b=g4ffMHZjCyu8x11WY1if256v35ur3sP069P/zNgpF7GpDf/VXZS5HIroFO+kNIu2bu VmDCq3/nYP3oPfkoo/JI9MZkcBZ1ick7VSZDHibf/7GjTZjHGU4cXT/tPpF6JdY3tw07 3mlkWSe35r9Wp4QW9thC+Mb7fr3Qw2gZhv0wogEVIWl6zljMbmFY6Be8ffrua3ww0j9/ H0Q5uBdHMg2OIHaHm9Y3xfsjKVE0uT20qDf8d+QS3ElII+v9Z3G0ok/UZxkSjHwvgR3Z qseQJ6PQ/uU7meM+dDPlC8Nx5iNl4QQusxxVJDXeuzGWS09VZhFnpu4eEO3XEWDyQcwq 0AXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0rnACV3hbRWsqpW2HE8Ikf+ekHji4cbWGZSHPV64ldU=; b=KlpOIc5qZvy3tzVRQKF4VR9p0n81JV7+ZZChGwuZNkjVsxAexHNi9Uefv2h0VWnH8o HGcMbvuuw4PEEC7w23tXi0JHKv69jw3JCuSbVzNRozPlIC9cOaik1R/DIbBVfNQr7CTr Rr22ez6FQGtQqcigfCEFZY374qFKZ3ASthuNNwJt5fUTOBcCPTTISbo9lqya7dp7H9pY j5lVntx2NRdc2P4lo2BJrP4eyELi1T+h4ugiTtNAgV6+8BtkYSpu7UfYnEj0ul4r2RrV 74JirG9zYgMtCkCY0/KZhkRW2DxnTKXwjJN2x3t3D6y3eRL0/1TJGntN/pkP8fWxoOos 9RcA== X-Gm-Message-State: APjAAAXFgFIScgXxQMMYkbawM6enViO2bPZyCLDntsNq1DJXsCSCkamT 5mX/DBVcBG62JrSsRS/ayAQ= X-Received: by 2002:a0c:b5ed:: with SMTP id o45mr564914qvf.242.1551380486929; Thu, 28 Feb 2019 11:01:26 -0800 (PST) Received: from quaco.ghostprotocols.net ([179.97.35.11]) by smtp.gmail.com with ESMTPSA id u18sm7800687qka.25.2019.02.28.11.01.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 11:01:25 -0800 (PST) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 74E724039C; Thu, 28 Feb 2019 16:01:23 -0300 (-03) Date: Thu, 28 Feb 2019 16:01:23 -0300 To: Steven Rostedt Cc: Tony Jones , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org, Mathias Krause , linux-trace-devel@vger.kernel.org, Tzvetomir Stoyanov , Michael Sartain Subject: Re: [PATCH] tools lib traceevent: Fix buffer overflow in arg_eval Message-ID: <20190228190123.GK9508@kernel.org> References: <20190228015532.8941-1-tonyj@suse.de> <20190227221250.74996869@vmware.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190227221250.74996869@vmware.local.home> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Feb 27, 2019 at 10:12:50PM -0500, Steven Rostedt escreveu: > On Wed, 27 Feb 2019 17:55:32 -0800 > Tony Jones wrote: > > > Fix buffer overflow observed when running perf test. > > > > The overflow is when trying to evaluate "1ULL << (64 - 1)" which > > is resulting in -9223372036854775808 which overflows the 20 character > > buffer. > > > > If is possible this bug has been reported before but I still don't > > see any fix checked in: > > > > See: https://www.spinics.net/lists/linux-perf-users/msg07714.html > > > > Cc: Arnaldo Carvalho de Melo > > Cc: linux-perf-users@vger.kernel.org > > Cc: Steven Rostedt > > Signed-off-by: Tony Jones > > Acked-by: Steven Rostedt (VMware) > > I have to say I've let this slide and it is not the first time a patch > went out with this fix. But this one has the correct fix because we > should use a buffer with a multiple of 4. Anyway, Tony I believe was > the first to report this anyway. > > For reference we have: > > I first heard about Tony's complaint on a post to linux-perf-users on Jan 18. > > But then we had after that: > > Michael Sartain reported it on 1/24 (and fixed by Tzvetomir) > https://lore.kernel.org/linux-trace-devel/20190125102014.19600-1-tstoyanov@vmware.com/ > > It was later fixed again by Mathias Krause > https://lore.kernel.org/linux-trace-devel/20190223122404.21137-1-minipli@googlemail.com/ > > But since Tony was first to report it, and we discussed that it should > be 24 bytes, I would say this is the patch to take. > > Again, sorry for not getting this acknowledged earlier and everyone doing > the same thing multiple times. :-/ > > Arnaldo, please take this patch. But also add: > > Reported-by: Michael Sartain > Reported-by: Mathias Krause Will do. Thanks for the credit research, - Arnaldo