Article View: linux.kernel.netdev
Article #21201Re: [PATCH] net/x25: release the route on a nonblocking connect
From: Martin Schiller
Date: Mon, 23 Nov 2026 17:44
Date: Mon, 23 Nov 2026 17:44
36 lines
10840 bytes
10840 bytes
On Wed, 04 Nov 2026 03:32:58 +0100, netdev-bot wrote:
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by code inspection). If it was triggered please include
> the symptoms, like the stack trace or error messages.
It is real and easy to trigger: every nonblocking connect() leaks one
reference on the route. After a single nonblocking connect() and
deleting the route with SIOCDELRT, kmemleak reports the route:
unreferenced object 0xffff8880008cf940 (size 64):
comm "x25test", pid 26, jiffies 4294892916
backtrace (crc 40ba0c57):
__kmalloc_cache_noprof+0x3c/0x69
x25_route_ioctl+0xe8/0x1bf
sock_ioctl+0x2d4/0x35d
__x64_sys_ioctl+0x56a/0x77c
With the patch applied, kmemleak stays quiet. Good catch, I missed
the route reference in e21dba7a4df4.
Wentao, as the patch is marked "Changes Requested", please send a v2
as a new thread with [PATCH net v2] in the subject:
- describe in the commit message, in plain words, how you found the
issue, e.g. "discovered by an AI code review agent", and add the
kmemleak report above as validation: a single nonblocking connect()
followed by deleting the route with SIOCDELRT is enough;
- drop the Assisted-by: line, checkpatch rejects it; if you want to
say which tools helped with the patch itself, do so below the "---"
line;
- add a link to this v1 below the "---" line.
Feel free to add my
Acked-by: Martin Schiller <ms@dev.tdt.de>
Technical Details
Message-ID:
<2b85d5c0abedae444d312de12a388ef4@dev.tdt.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369629-linux-kernel-netdev=dewy.ruReferences:
<20261104022812.1484250-1-vulab@iscas.ac.cn> <179375957890.488859.954022080109103885@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369629-linux-kernel-netdev=dewy.ru From: ms@dev.tdt.de (Martin Schiller) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] net/x25: release the route on a nonblocking connect Date: Mon, 23 Nov 2026 18:44:34 +0100 (CET) Organization: Usenet Network Message-ID: <2b85d5c0abedae444d312de12a388ef4@dev.tdt.de> References: <20261104022812.1484250-1-vulab@iscas.ac.cn> <179375957890.488859.954022080109103885@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="3943903"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:H5N06fQYa4FgLwpD9nL2oQUso1U= sha256:r5Sae7cUuivC0LXx6bVtDOrWdqlqeYLgZBfjLtviniQ= sha1:GAkEHYws7UWbTBsnWdoJDmUMR34= sha256:EmTttwKyCnkcm8OCDIA0FioAOgDe97AmvzqQXA5CF+c= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id D2E10125DC0; Mon, 23 Nov 2026 20:45:05 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=dev.tdt.de X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2-Gd06N4JCcA; Mon, 23 Nov 2026 20:45:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-369629-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=dev.tdt.de X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id D8B19125DB9; Mon, 23 Nov 2026 20:44:52 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 79BF5331F3; Mon, 23 Nov 2026 17:44:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1795455891; b=QfSOs09Ztnr79zQqs61AYD0upGvwaG0RWlWTufiFC3X2fVaLEFrRQTCwBWaKaocr8Jga ztxXVLfG1uDxdeQ1JB49ixN6os5pq1ZUbBZEfpv0ZH/Yp8pVvqNFy4jfTf/rkm7+kkDt+ NGy9iAFoCjpJk0WrTyj7eJIazMF6nhqu5jrck2EoMSTw2U7Ntl3DUnAb5Tb1l0kFs/j0p iPh+iU27+s8o3acOlJ7VUL78K93D01twzbdDh467+OTbJl5wxMoBFLOeH5EcLVTy9IcmW V20wZWV8JOjGOjj7juw5Pe5CDrhC0FtssfJWRF0IVU4joxI4LsE/l7ZwxBTp2E6QwUg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795455891; h=X-Original-To:Received:DMARC-Filter:Received:Received:DKIM-Signature: Received:Received:Received:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Transfer-Encoding:Date:From:To:Cc:Subject: Organization:In-Reply-To:References:Message-ID:X-Sender:User-Agent: X-purgate-type:X-purgate:X-purgate-ID; bh=Xem99+IMWHB2IdSRPHk081dyBcwHZcfFeuaBwZ4cstE=; b=ATodEZeqKqMsaRP85I+LoN0vd9CNgmtrikdMTOFTSXb5EKRnjAygPRvxFs6gPcKHIjPP 2xBvvoMQwCIl7efEm1rsQE990uC64EKv+OGxTWL2NVhm3p4FaG1DjeMBrGEwvWFHpU56D BE0VtkzUKjXMKmNfPXzpNWvVErdZ+GogRh6P4F2H+XdzYGBRY/ESHio3wkCCgpysVQq/T FOCFx57vRGrzjbBUuCnYxyOlAQ+6zSKm+as5ugTuypc1ElVAoHfKo7JhLBHCKaVVcmN1d E7DTH5I+jTKMzqZmDMfSC7OIdu3RO9auOPUZ8XQup8Nl1oYYIVkylfi9yMDTfxhv0sg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=temperror header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256 header.s=z1-selector1 header.b=ruvBVrzi; dmarc=pass header.from=dev.tdt.de; spf=pass smtp.mailfrom=dev.tdt.de; arc=fail smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FF4D606A32D; Mon, 23 Nov 2026 17:44:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=temperror header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256 header.s=z1-selector1 header.b=ruvBVrzi X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.198.224.70 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795455890; b=kgDXpXAIWaorRolcYiWenNcup0Tp1gam0JGEaEGZQusKPZf+AjK7icubpqGhEW5+f/Vh RriOP/MW60RZd4PAek50s7L6kd5/zR3ENajQbPWaXfVNjlJBO9IG8nSCL9n2BA3LbDhct ZBAM3lnGidsvLTeR34+Y8AuyybaywfA+S+gZ6H0Csux/ggNDgzT2GVyiFDXbLzZUm/FVN 7hkmVj1uP7fG2NWAgf4RwSHfZcXN89Yjn7hEJAFhnMgOPLSYJlwXizeiwMPz+h4GiBLB2 QxzEwLUfDvcag5v2FjpzjPMFpwA+vUACOqTCwLvmz5Z+3/v8XMJijAialPXYbJ/Ke7g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795455890; h=DMARC-Filter:Received:Received:DKIM-Signature:Received:Received: Received:MIME-Version:Content-Type:Content-Transfer-Encoding:Date: From:To:Cc:Subject:Organization:In-Reply-To:References:Message-ID: X-Sender:User-Agent:X-Spam-Status:X-Spam-Checker-Version: X-purgate-type:X-purgate:X-purgate-ID; bh=Xem99+IMWHB2IdSRPHk081dyBcwHZcfFeuaBwZ4cstE=; b=LYKlaubKWAxK6eNA2maRJcRHODVA8ZoZ+pVt/y0p11ElXoHXC8UaXYjtGsDmsq5RWwuT /9r6UVobjioTwZMJa7SQ2CYXr4dux5WIA8lf3xnRCrIUGae71Qt43nr1BNsgJWvCovwYh 2VBH3bP7UWp6Sc5Md1MAxaU0BC0sQsi1hPyXneDRouiHzJBET2vGgcSarBpWfF/quEPWp d8PbIcVwFT4knQJqBNsPast4JTOSdNxuodkHoN7mc6QuF+qWtvS/Kl/pYASk7baiZv6Fo 6LVYysCexY5mPgxaeMFKJ3Dq4SfqdsR7/lVrUVZWFbllLavJIx1Nvp1KQD//I56pxXA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=dev.tdt.de; spf=pass smtp.mailfrom=dev.tdt.de; dkim=temperror header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256 header.s=z1-selector1 header.b=ruvBVrzi; arc=none smtp.remote-ip=91.198.224.70 X-Received: from mxout70.expurgate.net (mxout70.expurgate.net [91.198.224.70]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4F08606A31E; Mon, 23 Nov 2026 17:44:49 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A4F08606A31E X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dev.tdt.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dev.tdt.de X-Received: from [194.37.255.9] (helo=mxout.expurgate.net) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from <prvs=68018334f9=ms@dev.tdt.de>) id 1xVY5l-00H8rQ-TC; Mon, 23 Nov 2026 18:44:37 +0100 X-Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ms@dev.tdt.de>) id 1xVY5j-008MmH-KQ; Mon, 23 Nov 2026 18:44:35 +0100 X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev.tdt.de; s=z1-selector1; t=1795455874; bh=Xem99+IMWHB2IdSRPHk081dyBcwHZcfFeuaBwZ4cstE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ruvBVrzi6YBU7Ay5rAfCvg8gnuLfurJyKS0TgqmwlBd7uCD6C/SNJvF4zX/N4ZY0n PJ7VnSch/E7Vb1oSg9ehsXmvYu5ddG+kikY5QwWaguXrhM9P1AhRJhhAn/afKfDl8X N/OrgbI+zJNCUfuDiKf5T2bmmpo4v2mfK27t5z8Xc58jg1jayp3L/Ry4koMpIDfZbb wDxY+n9+8qD4eLF+B+Mhu3P1i1/iSew9P3wr8+XtCLLDY5+H5o5CispSyCXWhJSGYb wdswQx9dtGNUOgJyOmdwB3KrMyAO1wutlzOWvi6VlvxeLMwDBpi0FkSEY3QUQD6rhL S1k6WTzvDkD9w== X-Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id E079B240040; Mon, 23 Nov 2026 18:44:34 +0100 (CET) X-Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id CE589240036; Mon, 23 Nov 2026 18:44:34 +0100 (CET) X-Received: from mail.dev.tdt.de (localhost [IPv6:::1]) by mail.dev.tdt.de (Postfix) with ESMTP id 7B56029BAC; Mon, 23 Nov 2026 18:44:34 +0100 (CET) X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, linux-x25@vger.kernel.org, netdev@vger.kernel.org X-Organization: TDT AG X-In-Reply-To: <179375957890.488859.954022080109103885@kernel.org> X-Sender: ms@dev.tdt.de X-User-Agent: Roundcube Webmail/1.3.17 X-purgate-type: clean X-purgate: clean X-purgate-ID: 151534::1795455876-ECF6CE18-0EA3A98F/0/0