Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1047162rdb; Wed, 24 Jan 2024 03:20:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQAfPxqgmIUR72luAqlWl4sn3mgeSA+gBwbGFtOsoOACp3zedag2jDJCxxfdI1xd4a7m3z X-Received: by 2002:a17:90a:8a03:b0:290:4168:e0f4 with SMTP id w3-20020a17090a8a0300b002904168e0f4mr3567544pjn.71.1706095233227; Wed, 24 Jan 2024 03:20:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706095233; cv=pass; d=google.com; s=arc-20160816; b=J4i088WmZSQB3QEXSQDK7g6wgwBKZslmqPeaQDRuRsxHbUnXuUra7AwSnVTOkiZ+pm za9tivTU8Ct68T2slRa8vCF6HD0cG8JZvmA9+to3+0lW+uISETaNeu9ZM4OwV2EkSddI GLY7F9PTKjZNPsZX14y16DfJgO7Tt0R6yICvpydXWv/bEG53B9AOQOAQOACQCZKHxfvF pQ2RVjNkN9ICxz1HeqgNlUp8Vn0vVf27yoRpqK4weJQ55Adlts6nHeQx5rZ5IazJ1QJY 9q1+Oz+4q+y965gIt0m6//eE+fkLkr354P+4AY/aq1FiLriYh5S9xEQ4h0EB3O3Va9ba vd3Q== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=x/xZChaqqFJp1esNkOOkHB12rmdt7osoPVBEyfTWS/Y=; fh=TixVDpgVdIT0apEkcAf96VWDJHycbsr7MbHU2tsVpJI=; b=nfu40PRTfiTrLVMz+PgZDjJQF826bAlpkK8CMpyZoLwxvp24LH0LepH+uWLUeZsU5k cGioiDcDn5sVuREin8U/QIzzwTZvYkcMSS87mDFXHUtSw4sQ+HMa9nU1eWxoocsoO+K6 lJKg+cmqqCWDBtbUOrY8powNhqhOHo0Rnk6RZ8JK17VOXwXJqZ9Tbpvtrejc3BCjqDoA xJxhvPwau8J6yOqHf2ZvW3XM0GU1MeP5A9GSOLzUCKqXWutrx3etgrFQVMYSBOzkKqkz wLXsAfbHRtoDgk2po5Lb9gsPrmqil6LaCBo6Te3Gh76DtEnd7pM7h++vd+5fJ/yfAhb+ 373Q== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=altlinux.org); spf=pass (google.com: domain of linux-kernel+bounces-36843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36843-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i17-20020a17090acf9100b002902388cabcsi11139743pju.32.2024.01.24.03.20.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 03:20:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=altlinux.org); spf=pass (google.com: domain of linux-kernel+bounces-36843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36843-linux.lists.archive=gmail.com@vger.kernel.org" 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 D72452832EC for ; Wed, 24 Jan 2024 11:20:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDDD01AADD; Wed, 24 Jan 2024 11:20:11 +0000 (UTC) Received: from air.basealt.ru (air.basealt.ru [194.107.17.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 832A32BAF3; Wed, 24 Jan 2024 11:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.107.17.39 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706095211; cv=none; b=bAtYECntS7dwPemU4AJ+d7lnOpvCWtUWd+YnAgj4J3FwqGwFHVwM+4+VpOF0b3BFrTL72kt7Md2rqq6dRE6nc/0uhu5bVrSGWh/8CaBjbVOlEbo6uLAX79O22J5E4l4yTkyZzRxSs1lSjoT3junoFqJ7swlY2aS0LFpZh8ZpJWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706095211; c=relaxed/simple; bh=SwYywfFiynvvHpJ2PvBMDL2E2B8ISlww9VXd7SFdmSE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iAvqIVw9qJ8N6BaDp+jk0e0fxD5O8zggZGDwSBN7A01Yhhwc5Cw+6McxKNGEqJkueq/uVD7al0V5v2wIWrhbLfMRnNCztFGhVtoF6p9eiPKUPDUek2iC9/5qdARAWh+ZkG+d09fDIs1EFAUVXTzkgQ9QcB17yDl48hGlcArSAzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org; spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=194.107.17.39 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: by air.basealt.ru (Postfix, from userid 490) id 733622F20242; Wed, 24 Jan 2024 11:20:06 +0000 (UTC) X-Spam-Level: Received: from [10.88.144.178] (obninsk.basealt.ru [217.15.195.17]) by air.basealt.ru (Postfix) with ESMTPSA id 94C0B2F20236; Wed, 24 Jan 2024 11:20:04 +0000 (UTC) Message-ID: <1144600e-52f1-4c1a-4854-c53e05af5b45@basealt.ru> Date: Wed, 24 Jan 2024 14:20:04 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 1/1] gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp() Content-Language: en-US To: Eric Dumazet Cc: pablo@netfilter.org, laforge@gnumonks.org, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, osmocom-net-gprs@lists.osmocom.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nickel@altlinux.org, oficerovas@altlinux.org, dutyrok@altlinux.org, kovalev@altlinux.org References: <20240124101404.161655-1-kovalev@altlinux.org> <20240124101404.161655-2-kovalev@altlinux.org> From: kovalev@altlinux.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 24.01.2024 13:57, Eric Dumazet wrote: > Oh wait, this is a 5.10 kernel ? Yes, but the bug is reproduced on the latest stable kernels. > Please generate a stack trace using a recent tree, it is possible the > bug has been fixed already. See [PATCH 0/1] above, there's a stack for the 6.6.13 kernel at the bottom of the message. [ 523.915255] Call Trace: [ 523.915255] [ 523.915255] ? __die+0x1f/0x70 [ 523.915255] ? page_fault_oops+0x14d/0x4a0 [ 523.915255] ? exc_page_fault+0x7b/0x180 [ 523.915255] ? asm_exc_page_fault+0x22/0x30 [ 523.915255] ? gtp_genl_dump_pdp+0x82/0x190 [gtp] [ 523.915255] ? gtp_genl_dump_pdp+0x82/0x190 [gtp] [ 523.915255] genl_dumpit+0x2f/0x90 [ 523.915255] netlink_dump+0x126/0x320 [ 523.915255] __netlink_dump_start+0x1da/0x2a0 [ 523.915255] genl_family_rcv_msg_dumpit+0x93/0x100 [ 523.915255] ? __pfx_genl_start+0x10/0x10 [ 523.915255] ? __pfx_genl_dumpit+0x10/0x10 [ 523.915255] ? __pfx_genl_done+0x10/0x10 [ 523.915255] genl_rcv_msg+0x112/0x2a0 [ 523.915255] ? __pfx_gtp_genl_dump_pdp+0x10/0x10 [gtp] [ 523.915255] ? __pfx_genl_rcv_msg+0x10/0x10 [ 523.915255] netlink_rcv_skb+0x54/0x110 [ 523.915255] genl_rcv+0x24/0x40 [ 523.915255] netlink_unicast+0x19f/0x290 [ 523.915255] netlink_sendmsg+0x250/0x4e0 [ 523.915255] ____sys_sendmsg+0x376/0x3b0 [ 523.915255] ? copy_msghdr_from_user+0x6d/0xb0 [ 523.915255] ___sys_sendmsg+0x86/0xe0 [ 523.915255] ? do_fault+0x296/0x470 [ 523.915255] ? __handle_mm_fault+0x771/0xda0 [ 523.915255] __sys_sendmsg+0x57/0xb0 [ 523.915255] do_syscall_64+0x59/0x90 [ 523.915255] ? ct_kernel_exit.isra.0+0x71/0x90 [ 523.915255] ? __ct_user_enter+0x5a/0xd0 [ 523.915255] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 523.915255] RIP: 0033:0x7f2bcb93cd49 -- Regards, Vasiliy Kovalev