From nobody Mon Feb 06 16:07:03 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 4P9WNm2hzrz3kvV2 for ; Mon, 6 Feb 2023 16:07:04 +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 4P9WNl45rnz4FP0 for ; Mon, 6 Feb 2023 16:07:03 +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=1675699623; 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=4n3YX6Z0Ui5E2rsJ3vPX3dT5Mq9TTdJFTnrsseAaw4w=; b=nb+A6S43eHrjDiNK00fVCNxybuhw3LLJZwqGa+aGGM9mOb6Ni4PKCvKaFc4vYaP+Zqhvog 6tUA+bRJAWER81yz1tG+fXTvrKMJtL6YtOpr8NkXLOo7aLX3Jfn8Sydl+3NIPlUnoSzVe9 dOEVbBTKLvCv+8AYA5vgLfvuS/Md+0VOVsTPJ6J2ledHyB9T3xlqh9TLucZacIze2oUDC6 0T742tUHAuIqWEw8cUFiSFjjF+KvPzs4DMDt4qRF4m8E1MkVMqSJV4bDreZA79WclsepfP BYNQt+waIrfxDPHJhPEKy3QaATccJ0RMyn6x0tLIkoU4Z4oTNzAAWfpZQI9gWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675699623; a=rsa-sha256; cv=none; b=SctShMVWHO2zxAvtoBlqxVDwFfHJNTJV5+2RI8EL4kLs38Lk74iL97S2tQ7iidFFv/Hjc9 oLSKMT0oqoHAFNYJPjKOvadibLS8KaYmEHZTTiVDWBzc66deNO4VVoq5QwBnR/wVslkr2C E1dgJDdu0Oe5NtWt/qNVdAhLmcl0VAonL7xzoQwE45cSyxKRpBg7NXDjbmABs1AKg3jSC0 owyTIm7Wpl3SLPAXqx0npeIZUG1s4LP3WTKUw0K6zHxb9KOF+icju3Djt9Gfww6scIYf8P 0GrxzQ9Cus2LHiR4mEFa1ipHigJxiV1d8vh6WKN88R6yQwsGRXl9UAH/rWVMfg== 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 4P9WNl3BBszgPk for ; Mon, 6 Feb 2023 16:07:03 +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 316G73nR085561 for ; Mon, 6 Feb 2023 16:07:03 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 316G73j1085560 for wireless@FreeBSD.org; Mon, 6 Feb 2023 16:07:03 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 269374] receiving an 802.11 mesh action frame while in adhoc mode can NULL deref in mesh_verify_meshid() Date: Mon, 06 Feb 2023 16:07:03 +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=3D269374 Bug ID: 269374 Summary: receiving an 802.11 mesh action frame while in adhoc mode can NULL deref in mesh_verify_meshid() 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 #239951 text/plain mime type: Created attachment 239951 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D239951&action= =3Dedit send an 802.11 mesh action frame to a node in adhoc mode -> NULL deref in mesh_verify_meshid() I've attached a demo that sends a mesh action frame to an interface that's in adhoc mode. vap->iv_mesh is NULL here: mesh_verify_meshid(struct ieee80211vap *vap, const uint8_t *ie) { struct ieee80211_mesh_state *ms =3D vap->iv_mesh; if (ie =3D=3D NULL || ie[1] !=3D ms->ms_idlen) # cc wtap9a.c # ./a.out wlan0: received action from 00:98:9a:98:96:98 rssi 128 wlan0: adhoc_recv_mgmt: recv mgmt frame, addr2=3D00:98:9a:98:96:98, ni=3D0xffffffc073568000 (00:98:9a:98:96:98) fc=3Dd0 00=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 panic: Fatal page fault at 0xffffffc000430b66: 0000000000000000 panic() at panic+0x2a page_fault_handler() at page_fault_handler+0x1d6 do_trap_supervisor() at do_trap_supervisor+0x74 cpu_exception_handler_supervisor() at cpu_exception_handler_supervisor+0x70 --- exception 13, tval =3D 0 mesh_verify_meshid() at mesh_verify_meshid+0x1a mesh_parse_meshpeering_action() at mesh_parse_meshpeering_action+0x198 mesh_recv_action_meshpeering_confirm() at mesh_recv_action_meshpeering_confirm+0x26=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 ieee80211_recv_action() at ieee80211_recv_action+0x13c adhoc_recv_mgmt() at adhoc_recv_mgmt+0x1d2 wtap_recv_mgmt() at wtap_recv_mgmt+0x28 adhoc_input() at adhoc_input+0x990 .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.=