From patchwork Fri Jan 28 04:47:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duoming Zhou X-Patchwork-Id: 12727930 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17D58C433F5 for ; Fri, 28 Jan 2022 04:55:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346142AbiA1Ezw (ORCPT ); Thu, 27 Jan 2022 23:55:52 -0500 Received: from mail.zju.edu.cn ([61.164.42.155]:40504 "EHLO zju.edu.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1346121AbiA1EzQ (ORCPT ); Thu, 27 Jan 2022 23:55:16 -0500 X-Greylist: delayed 447 seconds by postgrey-1.27 at vger.kernel.org; Thu, 27 Jan 2022 23:55:07 EST Received: from ubuntu.localdomain (unknown [10.15.192.164]) by mail-app2 (Coremail) with SMTP id by_KCgBHTIRXdfNhomB5AQ--.44160S2; Fri, 28 Jan 2022 12:47:23 +0800 (CST) From: Duoming Zhou To: linux-hams@vger.kernel.org Cc: jreuter@yaina.de, ralf@linux-mips.org, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Duoming Zhou Subject: [PATCH 0/2] ax25: fix NPD and UAF bugs when detaching ax25 device Date: Fri, 28 Jan 2022 12:47:14 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: by_KCgBHTIRXdfNhomB5AQ--.44160S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYn7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCF04k20xvY0x0EwIxG rwCF04k20xvE74AGY7Cv6cx26r4fKr1UJr1l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxV Aqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q 6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6x kF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AK xVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvj fUouWlDUUUU X-CM-SenderInfo: qssqjiasttq6lmxovvfxof0/ Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There are NPD and UAF bugs when detaching ax25 device, we use lock and refcount to mitigate these bugs. Duoming Zhou (2): ax25: improve the incomplete fix to avoid UAF and NPD bugs ax25: add refcount in ax25_dev to avoid UAF bugs include/net/ax25.h | 10 ++++++++++ net/ax25/af_ax25.c | 11 ++++++++--- net/ax25/ax25_dev.c | 12 ++++++++++-- net/ax25/ax25_route.c | 3 +++ 4 files changed, 31 insertions(+), 5 deletions(-)