Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1494788pxb; Thu, 28 Oct 2021 04:59:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw667sY5kSVbiACJn3UDehBqORCU9xXiUudpdxzAdNPlMFBDKyaDNSSgh3+Z5qcZiHGFjbk X-Received: by 2002:a05:6402:11d4:: with SMTP id j20mr5545785edw.267.1635422360603; Thu, 28 Oct 2021 04:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635422360; cv=none; d=google.com; s=arc-20160816; b=GeRr3ksF1+CFG5Yj8gklAw7cFogokcDs4r2xc4tEAKknoLN2J/3B3aLvW3vh1P6xro F+/fJ5N08pDRzjKyAAciWuav9soIlDxh7CxVMLFo9DgTbZfHxwmlSzmywKe4qsvD8Ya0 jyzIxaqEpWipkDtE+IrPGqRE6YS8svUiFmqFPD/Guq+qXyCyNR77U0yxV1SUrUcCH2Ff YBbkar38VHyELQzYtJcC0Bvr54GC5CpAEpifjpLjGqZEeosMeQZQbBtIjtNb0jUauvDZ sMI17dF2hprMgP2phCU+3PtyQLO5dfp3HYVcK0hDUOFnnt4K4dXjKdAWBzo0AyKLYXNN hWsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:to:from:subject:message-id :dkim-signature; bh=y8rl0XIlF2Cpg8lJtO567Qjj0qqLoriC6dnteEPeF9s=; b=dKBlNqZIPJLZZq3+tx+FMdGDVwQq7Nt9MUlMFYbJ+7MOFDdirySHaJ3TElbRZjWgip jdxs3Mf1kxGwnxRL8638LdRIWQLi7dZZfE9PgqXUNzlGeJUO2Piz6Lkm/Ves5YEf7Q5d Ht556PwAU0MwPHIRtIWTiAZUG+zEV41+9Uj8Ff2cgDLY2590IxPP/nNLkRuGgTXmVlie wN8SwCMZt1EIPZXaqiVmWNMUnEIzVuqqRaANj3WO9aySNMg5W+aDxLeAncR8K+e8vuZ8 oWWmzzFsAbeni2gfETzWhnIOUFalKchSf/JHfwGdnPxoIw5I5P3aTFNGQgsP4pe5zIJF ncdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=WjK2ObiN; 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 qa38si4270176ejc.111.2021.10.28.04.58.57; Thu, 28 Oct 2021 04:59:20 -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=@infradead.org header.s=desiato.20200630 header.b=WjK2ObiN; 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 S230310AbhJ1L50 (ORCPT + 99 others); Thu, 28 Oct 2021 07:57:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbhJ1L5Y (ORCPT ); Thu, 28 Oct 2021 07:57:24 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D73C061570 for ; Thu, 28 Oct 2021 04:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Mime-Version :Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=y8rl0XIlF2Cpg8lJtO567Qjj0qqLoriC6dnteEPeF9s=; b=WjK2ObiNkKVftdaJyUhHA0jBWj AFrpKFfQvlcu72O6hVoFALLaLErdeUgVt0n9phDkP9cjCpT8KsKROoUHUCJpVlnx8mv2F8nHtFSgp Ys/zs6zku8gMnswZYanFDlcdP22+f2WoIrVKDS+pi4tJVsJymp0rYkGq5ZgXYfeRV+984n8AVJwX4 onuGhNUrRFCPhLulfQ0JTHEIucYbeINXhDiRGNATgvYfrPcIX/fY/2y5Lo++h3T/cj6JzhTrRbwnS 1wfisF5sVQB3a4VAJAK5fgNPAOuDKn84HLTgC4dRMrs4GlGgkQbyeS2w3dkWvnGHq6iaWfc+dsptH 9FGsg2Fw==; Received: from [54.239.6.185] (helo=freeip.amazon.com) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mg3ze-00CkpU-7b; Thu, 28 Oct 2021 11:54:50 +0000 Message-ID: Subject: Re: =?UTF-8?Q?=E5=9B=9E=E5=A4=8D=3A?= drivers/char: suspected null-pointer dereference problem in handle_control_message From: Amit Shah To: YE Chengfeng , "amit@kernel.org" , "arnd@arndb.de" , "linux-kernel@vger.kernel.org" Date: Thu, 28 Oct 2021 13:54:49 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-10-26 at 11:51 +0000, YE Chengfeng wrote: > Thanks for your reply. > > Agree with you, seems that the branch at #line 1573 already handles this situation. > > Another question, is it possible that port->name is null when show_port_name is invoked? I don't see any null-check there, could it be a null-dereference problem at #line 1282? Link is below. > https://github.com/torvalds/linux/blob/master/drivers/char/virtio_console.c#L1282 Why don't you try it? It's certainly possible that a port doesn't have a name.