Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2215241rwd; Fri, 16 Jun 2023 00:22:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4bi1mq5K815NfAPCWdnap0XbSHufHDyhDoTbBx9QBhuQm37lDABFULfChWqGyYGdaFfYwG X-Received: by 2002:a92:c143:0:b0:33b:7584:d60a with SMTP id b3-20020a92c143000000b0033b7584d60amr1501282ilh.12.1686900166966; Fri, 16 Jun 2023 00:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686900166; cv=none; d=google.com; s=arc-20160816; b=FqxFkOmJFkD1PEbQzH3vXEf5r5RheOBNDpnua4lhhOcEDuMnHfBxeHX4UJFSG1IC++ DYcNb3y41eY5JxPyK013g3CXvS02ShXnOCYFQwaod59c1T+ROREsdaM98fZ2m7KOitwF bttnfYXmbBNIXAj3JLO7nBT61uBsPIC2GoDOUm5Z/mx2U+u50Yh7zsnTmM0yE5ryy1Hg OZ++kiLgQTVyjnJFfjzONkmij2bAnXBzbdwFNFmQnBeh1KLgOUgbAU5lGZmqlWrNvFCD FVMoAAa6BIwc8xiwLWvyq/TPASf4H+OEH5dhA6z2aMegE1BXyhrNzq9Ca1Kt2PbKBBNC TiBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=COaC0ynmHzfg2cnfvrZm7LmbT7lmgDotepixVwr8yu8=; b=YZEOPG+CbZF8UjmLkSK8wznmNXsbX7H1SX0yjv5NEZ1B7dcftlxSkzM2k5vy+1KcEL oBZUXPcfjtTRaItpiQZZzaT8E6DbjimUBUVHEBtLh9TqSPdYsmpJfSWTM4l7bVuUteaQ gVdsjP3oueUELpylqJjWY/rDeXIml0dSkT/aId+FhLViGsjnwSYE7Mc56Z5NaoJ8hcIY 2UH9dSkwca9epFh+xOZO1g3EtXTRfsFQnviGEh7Z6G1AM9PPeNQ86N4PyBraozysTcMl EeBk7gKKQ1uL+oLaVKnT9RfGfA/tvS/efhPlhpRbjp0NBxQMEvydcExiWE20vjO9w3+s uHgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=O158tCXq; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ev21-20020a17090aead500b0025327b5caefsi995071pjb.165.2023.06.16.00.22.32; Fri, 16 Jun 2023 00:22:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=O158tCXq; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241547AbjFPGqZ (ORCPT + 99 others); Fri, 16 Jun 2023 02:46:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjFPGqY (ORCPT ); Fri, 16 Jun 2023 02:46:24 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 953261FE5; Thu, 15 Jun 2023 23:46:22 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 532C72222B; Fri, 16 Jun 2023 06:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686897981; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=COaC0ynmHzfg2cnfvrZm7LmbT7lmgDotepixVwr8yu8=; b=O158tCXqjS+pgxh38t0qOwwTfr599e2FCqhHSylrVG+kFYgOZkvdBfLIznj8Ucj/lqQEmR QwIubs6Yz7T3uZeyIM1IwCcOPSCLHRqFkHLKBv8l4ysTCjbUWnhw01nhmEo1Tem/dHPw16 7f5W6UTcKrV5Ax8HkIRy0c9boR4clzQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686897981; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=COaC0ynmHzfg2cnfvrZm7LmbT7lmgDotepixVwr8yu8=; b=rddJRqYvXxvlbA8bk7L4VlG38sprBgB7dnxX5VA7a9ngnmuKFrLlHWNgdmAkIBi9qu8FDT I7ZSqa/LlpmfHcCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 33929138E8; Fri, 16 Jun 2023 06:46:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ADWrCz0FjGSWdwAAMHmgww (envelope-from ); Fri, 16 Jun 2023 06:46:21 +0000 Date: Fri, 16 Jun 2023 08:46:20 +0200 Message-ID: <877cs39a6b.wl-tiwai@suse.de> From: Takashi Iwai To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" In-Reply-To: <20230609082238.3671398-1-mchehab@kernel.org> References: <20230609082238.3671398-1-mchehab@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 09 Jun 2023 10:22:38 +0200, Mauro Carvalho Chehab wrote: > > As reported by Thomas Voegtle , sometimes a DVB card does > not initialize properly booting Linux 6.4-rc4. This is not always, maybe > in 3 out of 4 attempts. > > After double-checking, the root cause seems to be related to the > UAF fix, which is causing a race issue: > > [ 26.332149] tda10071 7-0005: found a 'NXP TDA10071' in cold state, will try to load a firmware > [ 26.340779] tda10071 7-0005: downloading firmware from file 'dvb-fe-tda10071.fw' > [ 989.277402] INFO: task vdr:743 blocked for more than 491 seconds. > [ 989.283504] Not tainted 6.4.0-rc5-i5 #249 > [ 989.288036] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > [ 989.295860] task:vdr state:D stack:0 pid:743 ppid:711 flags:0x00004002 > [ 989.295865] Call Trace: > [ 989.295867] > [ 989.295869] __schedule+0x2ea/0x12d0 > [ 989.295877] ? asm_sysvec_apic_timer_interrupt+0x16/0x20 > [ 989.295881] schedule+0x57/0xc0 > [ 989.295884] schedule_preempt_disabled+0xc/0x20 > [ 989.295887] __mutex_lock.isra.16+0x237/0x480 > [ 989.295891] ? dvb_get_property.isra.10+0x1bc/0xa50 > [ 989.295898] ? dvb_frontend_stop+0x36/0x180 > [ 989.338777] dvb_frontend_stop+0x36/0x180 > [ 989.338781] dvb_frontend_open+0x2f1/0x470 > [ 989.338784] dvb_device_open+0x81/0xf0 > [ 989.338804] ? exact_lock+0x20/0x20 > [ 989.338808] chrdev_open+0x7f/0x1c0 > [ 989.338811] ? generic_permission+0x1a2/0x230 > [ 989.338813] ? link_path_walk.part.63+0x340/0x380 > [ 989.338815] ? exact_lock+0x20/0x20 > [ 989.338817] do_dentry_open+0x18e/0x450 > [ 989.374030] path_openat+0xca5/0xe00 > [ 989.374031] ? terminate_walk+0xec/0x100 > [ 989.374034] ? path_lookupat+0x93/0x140 > [ 989.374036] do_filp_open+0xc0/0x140 > [ 989.374038] ? __call_rcu_common.constprop.91+0x92/0x240 > [ 989.374041] ? __check_object_size+0x147/0x260 > [ 989.374043] ? __check_object_size+0x147/0x260 > [ 989.374045] ? alloc_fd+0xbb/0x180 > [ 989.374048] ? do_sys_openat2+0x243/0x310 > [ 989.374050] do_sys_openat2+0x243/0x310 > [ 989.374052] do_sys_open+0x52/0x80 > [ 989.374055] do_syscall_64+0x5b/0x80 > [ 989.421335] ? __task_pid_nr_ns+0x92/0xa0 > [ 989.421337] ? syscall_exit_to_user_mode+0x20/0x40 > [ 989.421339] ? do_syscall_64+0x67/0x80 > [ 989.421341] ? syscall_exit_to_user_mode+0x20/0x40 > [ 989.421343] ? do_syscall_64+0x67/0x80 > [ 989.421345] entry_SYSCALL_64_after_hwframe+0x63/0xcd > [ 989.421348] RIP: 0033:0x7fe895d067e3 > [ 989.421349] RSP: 002b:00007fff933c2ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 > [ 989.421351] RAX: ffffffffffffffda RBX: 00007fff933c2c10 RCX: 00007fe895d067e3 > [ 989.421352] RDX: 0000000000000802 RSI: 00005594acdce160 RDI: 00000000ffffff9c > [ 989.421353] RBP: 0000000000000802 R08: 0000000000000000 R09: 0000000000000000 > [ 989.421353] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000001 > [ 989.421354] R13: 00007fff933c2ca0 R14: 00000000ffffffff R15: 00007fff933c2c90 > [ 989.421355] > > This reverts commit 6769a0b7ee0c3b31e1b22c3fadff2bfb642de23f. > > Signed-off-by: Mauro Carvalho Chehab Note that CVE-2022-45885 was assigned for the original issue as a security bug, and now it's reopened by this revert. Please let me know if you have a fix in another form. thanks, Takashi