Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp583674lqp; Fri, 5 Apr 2024 02:50:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2l2W0y5hpg+OWfO5Rw+yZfYACHHBd3VR/73j+6nMXYYio5rldiGi8Tif3Zik/7W0Ospft3L2SlmqU/GjjC26ijl4ANXQjqdy5FPlI+g== X-Google-Smtp-Source: AGHT+IFJLywCak5KBv77Wzy5XXJiXNOv8yhbO+bmOpbxOdPC7IbqtLDAh4WGCvO7W92ub+P1FcGt X-Received: by 2002:a05:622a:1711:b0:431:3df8:30b1 with SMTP id h17-20020a05622a171100b004313df830b1mr944588qtk.40.1712310634891; Fri, 05 Apr 2024 02:50:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712310634; cv=pass; d=google.com; s=arc-20160816; b=JthyFsG3Q7s2CuEVgC7ZuSwTzNNhnRNKWfY3pTC+sAwqYRmWiV8BJy+ltbQo4J1HPR M62gNGFpcfnjKk4NxhPaGbs08bZaMuuJQ67n8rsS4jR0tarRELLYbgz+Pcfn5vS9fyr7 uaWTP7UU/Un8xlaznIKoxGyv+PICaXGOj56h4xgFLEiBhsxM8Ty/htLH5DHSYYyea26R icQgWQp6YYlFhb9G9+rZzLwqqVxhPZpDPcHF/lVUnVZHILowgwLqMlK5C6Prd926YWxj 0oTJ2JeHST0niLDDzE6MlxF1DQ5c9IhWyCwCZ0JC6MWdClnPQIQ2i8R/ZVBloxBCNUgs BJOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Kb3Yb6nC5eLykvz9hPDNWaproqkPnw7c7FiuyRtCxdg=; fh=U0CrWdj0EF3Lhj3RM2h5e+wgrCpyYCjGO6vbvFi6ooE=; b=gsY06p4p29lNojjPUDmZA8zTbMmpYxY8OcF8Ukc7iC6byIxlTTlISrTO4v+LE1D3eM JR8QqL0Qoc4UK++8uoKRi+A5VNEinS/golE+m1UuSAzlCad1va4iDHpmZeKkXUzjY1DC FjI7gK0Eaq/kfwMlCOsaCSBDRgnjgtuNrKJO7ZSNWlR3+xWxYW8pkEyxlnzHCE5Vz6yP phrtonxVdlre5N9vM/vUe97cilA9eVIFqmbmj33eKUHQqYBQnCe0/G68+AORC+kVW0E3 PdgxLgGOkdazn9+n+fVmk4z7ftpznGCiP2tAUVgeVD66YMdUPk/N8uspOXR+S8GaOlQ2 /l3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-132762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132762-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u17-20020a05622a011100b004315cf58118si1402841qtw.277.2024.04.05.02.50.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 02:50:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-132762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132762-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9775D1C212C6 for ; Fri, 5 Apr 2024 09:50:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7F66160886; Fri, 5 Apr 2024 09:50:29 +0000 (UTC) Received: from mail115-24.sinamail.sina.com.cn (mail115-24.sinamail.sina.com.cn [218.30.115.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5210D16079B for ; Fri, 5 Apr 2024 09:50:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712310629; cv=none; b=o/FH/AYUB0GRuTOCPsvFfjJ3wvIWHwP6VNHCmgPUR0o/ZdxpfjrI3rUncrxY70p9PG2hUJw/Jxb8SF+Q3aWBhC/K1K2+eyC4b37y/P5mE7XgSodKVHikB2cIZtYnma2WY4zi8x38laGrqweCNVOOYzT6kCfWjB6Ti59vVfCLcu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712310629; c=relaxed/simple; bh=ld7MABUIT4GwB7SBBdUAqHWGXEUI6Uu+yUkMDyLDVj4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dBaYfnWNYXK/JuvZUfuC5dJok3eG+vn3xLiXYy7HtlWXsyONLPKbroLgInjSqBRPX1GeirZInssnbJiL46CuJ697D/giUsFuj0hwpCn4pvV0Zt9eQ3YMpMD/jtvt1iJ5lmjK/QxonP/p4okGR42hUHw2BaJsqxo3cSCkZuuDEsQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([116.24.9.172]) by sina.com (10.75.12.45) with ESMTP id 660FC92D00009DCE; Fri, 5 Apr 2024 17:49:35 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 88954431457930 X-SMAIL-UIID: 469E1AF257C64CE583A829E75E09A4B8-20240405-174935-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [bluetooth?] KASAN: slab-out-of-bounds Read in hci_sock_setsockopt Date: Fri, 5 Apr 2024 17:49:24 +0800 Message-Id: <20240405094924.896-1-hdanton@sina.com> In-Reply-To: <0000000000007558ae061553f41b@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 04 Apr 2024 23:56:28 -0700 > syzbot found the following issue on: > > HEAD commit: fe46a7dd189e Merge tag 'sound-6.9-rc1' of git://git.kernel.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1777929d180000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e --- x/net/bluetooth/hci_sock.c +++ y/net/bluetooth/hci_sock.c @@ -1946,7 +1946,7 @@ static int hci_sock_setsockopt_old(struc switch (optname) { case HCI_DATA_DIR: - if (copy_from_sockptr(&opt, optval, sizeof(opt))) { + if (len < sizeof(opt) || copy_from_sockptr(&opt, optval, sizeof(opt))) { err = -EFAULT; break; } --