From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FD9AC433F5 for ; Thu, 28 Oct 2021 11:55:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10B7F60F56 for ; Thu, 28 Oct 2021 11:55:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbhJ1L51 (ORCPT ); Thu, 28 Oct 2021 07:57:27 -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.