From nobody Wed Mar 01 16:03:40 2023 X-Original-To: wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PRfDD6vC8z3v2gP for ; Wed, 1 Mar 2023 16:03:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PRfDD2rpDz3n33 for ; Wed, 1 Mar 2023 16:03:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677686620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7gjGZCIVFqFAYll15s+EvUe/zDMit7Qe8z3CK+YzRz4=; b=LPp5Svv35VEnfgKi/TSt6kKat6OePMj/ur15FlITZ6yZils27MYyIcpts1jHfVsDWyt6jK 3w63ZnHubGVu86cUh3hUr1E/vntigvgZXgwt1QiraRyFFb6UBEW0pf6N04AjSP+xuxOt5J Qkk3d9KyKzPk9dwaxgVOj3uRwaJ5EYEGsDdJgPO+7ggRhFu4pOTAOCAl09sxTwzuNrxdoi d7astl9XahdABO+syCSp6Xq/7kNiK62BWgjlZr8XSI8nUVWCK5Iqz+82Lny4v+/567D6At mTGFDzxMylOhkyq0fHU27vhcf8r59yaMO4OAbFSJ1nSkia3jfQyThqdNtvDOuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677686620; a=rsa-sha256; cv=none; b=K7dDm+Uh0odLmOnFgVtkYfepR+FWmVBaZNY4o95QU13FobwmvtWhOrjTOcI2nViXP1rHu8 XoJWMreXcfs1awnEOhc11pcREVkwJ1tUsEUaMNHzlak11Yo3VZO3Nj+pJcOPb7YmV2IK0j HAbkjBrH8juRw4Po0TNZRjrsqyoT/FGHfxAowDFyLOFMoYes30rmnU37wurQu1Rw4mvoRO j5s4rhcFZ4+ErzWF0tes/vCOOKJLm3TbUK5kCHyghux3w73J6UIAdU6dsXgbglgs/GbFt2 Ni6Q7QO81PBZpUqjsRFus7y/lJxspiKWc6kG2/gw2Kt44QZjPkZflQTKqq5z3w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PRfDD1y97zfsB for ; Wed, 1 Mar 2023 16:03:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 321G3eOt001913 for ; Wed, 1 Mar 2023 16:03:40 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 321G3e9N001912 for wireless@FreeBSD.org; Wed, 1 Mar 2023 16:03:40 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: wireless@FreeBSD.org Subject: [Bug 269898] broadcast addr4/meshSA causes NULL deref or panic in ieee80211_mesh.c Date: Wed, 01 Mar 2023 16:03:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rtm@lcs.mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: wireless@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.mimetype attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269898 Bug ID: 269898 Summary: broadcast addr4/meshSA causes NULL deref or panic in ieee80211_mesh.c Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: wireless Assignee: wireless@FreeBSD.org Reporter: rtm@lcs.mit.edu Attachment #240508 text/plain mime type: Created attachment 240508 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D240508&action= =3Dedit send an 802.11 mesh packet that causes a panic: no route in mesh_recv_indiv_data_to_fwrd() If an 802.11 mesh data packet to be forwarded has addr4/meshSA set to ff:ff:ff:ff:ff:ff, an INVARIANTS kernel will panic in mesh_recv_indiv_data_to_fwrd(): /* set lifetime of addr4 (meshSA) to initial value */ rt_meshsa =3D ieee80211_mesh_rt_find(vap, qwh->i_addr4); KASSERT(rt_meshsa !=3D NULL, ("no route")); The corresponding KASSERT in mesh_recv_indiv_data_to_me() can also be triggered by an incoming packet. These turn into NULL dereferences in non-INVARIANTS kernels. I've attached a demo, which depends on the wtap kernel module and the wtap and vis_map utilities: # cc wtap30b.c # ./a.out panic: no route panic() at panic+0x2a mesh_recv_indiv_data_to_fwrd() at mesh_recv_indiv_data_to_fwrd+0x146 mesh_input() at mesh_input+0x6d4 .LBB2_17() at .LBB2_17+0x34 taskqueue_run_locked() at taskqueue_run_locked+0x96 taskqueue_thread_loop() at taskqueue_thread_loop+0x62 fork_exit() at fork_exit+0x80 fork_trampoline() at fork_trampoline+0xa --=20 You are receiving this mail because: You are the assignee for the bug.=