Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp572736ybt; Fri, 19 Jun 2020 08:27:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykPSdtM/RlEq0prbgepD6WeZ6Gfc6Id1eBrkynYjI0cxFgC6G1H7X8hdPY+S2hGVn/L1zT X-Received: by 2002:a05:6402:642:: with SMTP id u2mr3837241edx.230.1592580458614; Fri, 19 Jun 2020 08:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592580458; cv=none; d=google.com; s=arc-20160816; b=04WSt3fGQkFDHhm9+f6kg1wl1DJbwfYtGE3SLaE+cn5bkUahsmDe8xPZz6aW0N1uWi 55pleqXDufsMOsbrk5VUECZhOWBTCayA1Pne9vfUuR31hLGhv5mLlfVxEn6vjHFbOO96 ba9RmLsF2n3kwZ4MLpmBQ3+gmHGJo2/HToH0aLkCZSe9y103jRJloaYE2qgWmUK3IGd4 p6Wnf0ffTOEThe4nepExNULPQ80QhxJtwxxMWD2Z4DodP0a654Kiux9x5SjKk3fc+Ala dMs04PN/i/5R1PMlJs6ZsnurfWMcrUA2Byk610K6sxqXjUoN04yq6JP36FRUfjBCfFnp rX1A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OUABWdWEFBVUpoaVzvw5oZEFLhNQamyR8tMichpCLMI=; b=04qfL1xs+oVqOXgFEpvN/7+zCcf5E8iW6ZamLpz0bMIOvarX6QwVGsnxKDwUxpPI+Z dIr679eL4ctcTxjpGNgYNoj+YQJChGylA6wic3yNMCMYuAR0qjhEO7CRj+uARkeJDw1C 4vqzeIXwdQlwNgLtApeyqhEafLOSUnNih/mi5sryTSHzBPO3nQ6ajgesO2b1P3x97dyi h95H1oQYbK0/vZvftG9NXElmprRwr8H2+3U4cUGPOrKmC/tXP7c1MrByADvGjkdL5lDi YonW9n7LljFz1hk+D6gAaXwx8PeRlOEg1UcyTkioxXPpWEun18D1e9occtCR7shHBw/n cv0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N70cSVpe; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 7si4373578edj.329.2020.06.19.08.27.16; Fri, 19 Jun 2020 08:27:38 -0700 (PDT) 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=@kernel.org header.s=default header.b=N70cSVpe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393314AbgFSPYp (ORCPT + 99 others); Fri, 19 Jun 2020 11:24:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:53010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392892AbgFSPVo (ORCPT ); Fri, 19 Jun 2020 11:21:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 574AC21548; Fri, 19 Jun 2020 15:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592580103; bh=TZrUG0c+bqLjBayBmaG07PdziZ3fDMuG7ttxZs3ZcfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N70cSVpe4pEOxXAxPtRyTWd0sz2w9C1EUFCNHMnbYdSvI0g1PsO2SsmnO1PSqnGwu U4JMCJIIqiQoJUcmkIK+7D4+36QNQLqez75/n5z8UxXJHKM5086wVVA5ajEJBC65QX 19g8KJAsXD70fAgJD5swe08YTGaqO4cW9dPWzJo4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrii Nakryiko , Alexei Starovoitov , Sasha Levin Subject: [PATCH 5.7 124/376] selftests/bpf: Fix invalid memory reads in core_relo selftest Date: Fri, 19 Jun 2020 16:30:42 +0200 Message-Id: <20200619141716.205467075@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141710.350494719@linuxfoundation.org> References: <20200619141710.350494719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrii Nakryiko [ Upstream commit 13c908495e5d51718a6da84ae925fa2aac056380 ] Another one found by AddressSanitizer. input_len is bigger than actually initialized data size. Fixes: c7566a69695c ("selftests/bpf: Add field existence CO-RE relocs tests") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200429012111.277390-8-andriin@fb.com Signed-off-by: Sasha Levin --- tools/testing/selftests/bpf/prog_tests/core_reloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/core_reloc.c b/tools/testing/selftests/bpf/prog_tests/core_reloc.c index 31e177adbdf1..084ed26a7d78 100644 --- a/tools/testing/selftests/bpf/prog_tests/core_reloc.c +++ b/tools/testing/selftests/bpf/prog_tests/core_reloc.c @@ -392,7 +392,7 @@ static struct core_reloc_test_case test_cases[] = { .input = STRUCT_TO_CHAR_PTR(core_reloc_existence___minimal) { .a = 42, }, - .input_len = sizeof(struct core_reloc_existence), + .input_len = sizeof(struct core_reloc_existence___minimal), .output = STRUCT_TO_CHAR_PTR(core_reloc_existence_output) { .a_exists = 1, .b_exists = 0, -- 2.25.1