Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1558898pxb; Thu, 28 Jan 2021 21:55:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLR8W9zGNHEFM3GiPTdtBF8CCFwu4F7Hjsndb9ancR3xsq/LpOyRZAn6LQnQOfxncOI9Ts X-Received: by 2002:aa7:d6cf:: with SMTP id x15mr3410670edr.336.1611899705236; Thu, 28 Jan 2021 21:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611899705; cv=none; d=google.com; s=arc-20160816; b=ic1gR3egJca6uT2q1oUBkhwQIde1AaPNkcsXtKaLGa/n9SbcagTNkHU8vNyBNf4TbG oAm2bnxhdFXPnylaLG7bRvFZm3MdGa4RZ1CJAeK/3ZJlgG+axsCE/y1noNalgmyAIShz Ko7aoncMKpPNvYbnV/hIFzfw3aCmeIvgPJjG+jnogZGDTHi4+8YZgLztI6dbinWgOKpC YGgL5JYLW3hvXhvRDA7AzV0TzXtbBlR6vE4ZwUK8kR8RdZVv4M9p35wPLDW1wtMll6EN Cs+ZlZRhyWefFjL5COrUNUhFX6HRomxKFJ8ZWSZt04E9RgUrAWTyVURt646wZyQaOqra I8iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Ow5ydo/TJStp8kEk4cDnwYT2nM2cjVo+nNcaB56E1YM=; b=E8vefs+rZsKfBeLKAHGzcWZ2hecqw9tpT9OHRLUB7XSyP+37x8wy2JH0/Tsit9Zk3r c6ogqkY+71hyg4vXV03+I5nKpF5ohuv1/JcfohiJ0+rRDF0nLYGv+1CqE9/W74zfDuly G/zmIwMsO+aOjUrrPMd4g4CM6Vu8Pv1h93B9JC4bvbZh546VEy4sbQddI2yGpb420kfQ haEyveb1oM2KZ5am+oSI01Qhf63pHML3azCJyFKLSSLYSGalhRj4BYxXb4mkQB06hJsr WcMgX4lE6hUJ3DuGND9cVchmhXbkteJWz+7f798J3WsdpGIjcE6HsINaRlWG8/eUfbhm vzYQ== ARC-Authentication-Results: i=1; mx.google.com; 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 q16si4055049ejd.199.2021.01.28.21.54.39; Thu, 28 Jan 2021 21:55:05 -0800 (PST) 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; 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 S232003AbhA2FuZ (ORCPT + 99 others); Fri, 29 Jan 2021 00:50:25 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:55811 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231939AbhA2FuX (ORCPT ); Fri, 29 Jan 2021 00:50:23 -0500 Received: from fsav301.sakura.ne.jp (fsav301.sakura.ne.jp [153.120.85.132]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 10T5mhR4047405; Fri, 29 Jan 2021 14:48:43 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav301.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav301.sakura.ne.jp); Fri, 29 Jan 2021 14:48:43 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav301.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 10T5maKc047394 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Fri, 29 Jan 2021 14:48:43 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: general protection fault in tomoyo_socket_sendmsg_permission To: Shuah Khan , Hillf Danton , syzbot Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Andrey Konovalov , Valentina Manea , Greg Kroah-Hartman , syzkaller-bugs@googlegroups.com References: <000000000000647eff05b3f7e0d4@google.com> <20201113120055.11748-1-hdanton@sina.com> <5f71e0c1-d387-6d72-d8e4-edb11cf57f72@linuxfoundation.org> <2b70d360-a293-4acb-ea6c-2badda5e8b8b@linuxfoundation.org> From: Tetsuo Handa Message-ID: <9bdd3f10-bddb-bd87-d7ad-b4b706477006@i-love.sakura.ne.jp> Date: Fri, 29 Jan 2021 14:48:36 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <2b70d360-a293-4acb-ea6c-2badda5e8b8b@linuxfoundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/01/29 4:05, Shuah Khan wrote: > The reason I don't like adding printk's is this is a race condition > and as a result time sensitive. Adding printks in the path will not > help debug this issue. It will make it harder to reproduce the problem. Not always. Adding printk() might make it easier to reproduce the problem. > > I am unable to reproduce the problem using the reproducer and running multiple instances of the reproducer. Since syzkaller cannot find a reproducer for "general protection fault in tomoyo_socket_sendmsg_permission", and you cannot reproduce other problem using reproducer, trying to obtain some clue via printing messages by asking syzkaller to try debug patch can be very helpful. Since "general protection fault in tomoyo_socket_sendmsg_permission" is caused by unexpectedly resetting ud->tcp_socket to NULL without waiting for tx thread to terminate, tracing the ordering of events is worth knowing. Even adding schedule_timeout_uninterruptible() to before kernel_sendmsg() might help.