Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp328758lqb; Tue, 4 Jun 2024 12:38:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXV9NliY6JvO9KugXZpky0pBVdJJjtn3g/3t6M+4Ai3XVCvVaS5od0M9VaYcjB6QQYNN3slVe608F+qLTzo3/3LbuDx0DJSA/opXXz9VA== X-Google-Smtp-Source: AGHT+IEdtUyVTRISHHmfy/mCr+t685hWz7Pe7KNn8Ij1MtvfQVHlDcwGRGeZW8XLre6yWB8RWW0W X-Received: by 2002:a05:6a21:192:b0:1af:d35f:f282 with SMTP id adf61e73a8af0-1b2b6f31a73mr653096637.14.1717529927980; Tue, 04 Jun 2024 12:38:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717529927; cv=pass; d=google.com; s=arc-20160816; b=U77NhHIRQA28YTHEUMFoftEsvj9eO4F1wH4pGyNrjuG9V7cqnCr5qu//a3nJ8weRo3 dksg+wdc/45yCS2Wzgwri061qjGFGo2tIAArjqUNrxLY5hEM+nPnTyvRztRERyruTZGW nka/t0g9qsMMuY9f4SqBm/2g+JO39Iq2BwA1SB81mnzxzm4dUanMjHfkQyRQN4YYWosX zFofYjGwrFqxQ7iIyb4mDecnx1h+wNm5T6pEFaTnCNWcv6qKwZcBDvAJyrCcKkUB+KGD 3nMTTfI32i/rS1CKer8IYDYisdzZn/c8mo1HmPHWVQ3oE8YGq+sW+byjXsWdzw67fuza IJRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=H4t2g0PVVuuW+v+1R4uuv5ecvQtI5NuL9WT54hihDiE=; fh=eLQACor2RFR2BkYoq1RDI7vb2MOWpGa8p68Jp+fgum0=; b=sfTAZUwvsKUcuQP9AZx+BsQi2/NK4jaBK5u6zwnQSttVlgrQ9773HGP0U2Krn7sWVB ATgjYsyinCNDlJVcsy0R/y5lX3MtuF/Jer6LP4YjKt+Viveq0a4MAFwPBKpxlfmQyR/F LUSTU/k4g7yxWGDg0k8QRK9+9Yva7mJQXCp76NAw6ozNi5TKQ38Ucq0kHa9K8qvjvJ/v x+KayQTkmSt9H2r2KQTy0R6f0BhEeglTxv713GRiUnt2grMiEUpaNUFfqUui4ynWXuvZ MwVcJ68fJgARwCuSHHGMC0xG3+i7ltODO6Mt60nAsVNaAQ4VRqurlfdfDqN6pcM3Qjvr ZjBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eubmOaYP; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-201297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6323dd522si19174705ad.325.2024.06.04.12.38.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 12:38:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eubmOaYP; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-201297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7B5B6284823 for ; Tue, 4 Jun 2024 19:38:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E42E14B095; Tue, 4 Jun 2024 19:38:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eubmOaYP" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17957147C91; Tue, 4 Jun 2024 19:38:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717529919; cv=none; b=cltUQAmjLo4Xe6hX8FQg/Joh0Mh/qWbrD8VrwIjvwfCEGiMku+t2PAuSRjd1Wj/Fh14hQyrnvopBosDXCx0DJ5GOQAEELNq8dQBE8pGW8JLeMPpPNaGYKHtkA+fasag+RimjfwFkpA7n7IQKl5skz5kenQT3ds6v4803CaR1fos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717529919; c=relaxed/simple; bh=vzpA7PhiRZMIE5wHE8wHo0Nvafg+sm213PxA91ONTYM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RSgqeGoL373B9IkNnIJlVbMC/t3ODZtgX/+EjlPfvgyxsSpDC6s2jiuezXIrqq4/zumkl91sQJm3bg5jMZ+ANm0EPCSerri2y7V2hfcD5Sxu/NG3Z4jiD+q8T2k/bwkE9eaPrmN37gsgvoEEVNcEDkMy6RnyWMk9Jx10dXZz4wY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eubmOaYP; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-35dc04717a1so4476374f8f.2; Tue, 04 Jun 2024 12:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717529916; x=1718134716; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=H4t2g0PVVuuW+v+1R4uuv5ecvQtI5NuL9WT54hihDiE=; b=eubmOaYPggZMRWJ3QqGv7kWv/DDYrsDi6tu4q7yl9/Osf+/FpB6CtRjcoGi2pgVz1F tlLhcPl13piOwoGBvMiNne1aQOm3HoXHGfbrz/HGMl08XV5jF8BmYuBIVm/c3M0rtyhA mNrxussSc1wCxjW19VoXXCi5lEb1zxVzyCZNGhBEVL04UFQDNPyXuBQzbelZAABiR9qA atV4EReAnjpp7GnJbjrMTO55qE9ns0TgZwbiyIwkoS+PA9C9x50j4PU1DhzFlJTXKBzE IYj1lh9bLnvzXeatbqY2FP40MVO181XS2nsSrvAVl73WbAnTgRVeB+x/2q1FU0okXMGC aPAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717529916; x=1718134716; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H4t2g0PVVuuW+v+1R4uuv5ecvQtI5NuL9WT54hihDiE=; b=hIk9O0Mghp1f5jPBtr2ZCSOCOfhds7NcO/n4HB4riE60cjagjOz/T3mURwmpLR9Z9Y 0CpnfCckqv7nj3AXsZ5iXIplInGs6TuCm7ZXl/4kQMD91wVwqiMje+9oJSHWeToqXPTg t4iRJof4HGKRJchvoMCcRL5kKgJILldb2OfICuAmO0a50AxR8f1XkUdxcGvfzBIUZzzA FS4iKywBeBtmg6Sdng50UjOumjxEbNb/978flsn42OipVtQxgfiNBHHMY0IQ+6rnLUIs K7EMtudtMJETbeOlsMGRMXcyH0vUMiBY28AGiubtZOOhQ4DKXcnQHxqXJnpNyi2QNfaU 9Lxw== X-Forwarded-Encrypted: i=1; AJvYcCXKIqcSedfG9V+44Xtu+07qULKblWDJgsXEldJVDefjS1OE1FN/LwLkcz3KLTEp4fEZemodvo/apWT4wT9y84wFxjkJi5JNF67LaUjgj9ho5tyteFDKQSSWxwqgQJ5mNmsFRoh4 X-Gm-Message-State: AOJu0Yy6r4wc/jXG+SZbl+shfXdLAXdFLN1kCjvTcccfL49uAZlRz5J8 Jhdbfp5KILAjux+fYwCeslTlnRqZ/+paFMdrKKl3axLpjmaiWpWj X-Received: by 2002:a5d:5846:0:b0:35e:6166:2e1e with SMTP id ffacd0b85a97d-35e8ef90cc6mr333885f8f.50.1717529916248; Tue, 04 Jun 2024 12:38:36 -0700 (PDT) Received: from [192.168.0.5] ([69.6.8.124]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f2asm12536869f8f.3.2024.06.04.12.38.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jun 2024 12:38:35 -0700 (PDT) Message-ID: Date: Tue, 4 Jun 2024 22:39:09 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] net: wwan: iosm: Fix tainted pointer delete is case of region creation fail To: Aleksandr Mishin , M Chetan Kumar Cc: Loic Poulain , Johannes Berg , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org References: <20240604082500.20769-1-amishin@t-argos.ru> Content-Language: en-US From: Sergey Ryazanov In-Reply-To: <20240604082500.20769-1-amishin@t-argos.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 04.06.2024 11:25, Aleksandr Mishin wrote: > In case of region creation fail in ipc_devlink_create_region(), previously > created regions delete process starts from tainted pointer which actually > holds error code value. > Fix this bug by decreasing region index before delete. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 4dcd183fbd67 ("net: wwan: iosm: devlink registration") > Signed-off-by: Aleksandr Mishin Nice catch! Acked-by: Sergey Ryazanov