From nobody Wed Nov 08 07:16:38 2023 X-Original-To: pf@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 4SQGbp4qbmz50DYh for ; Wed, 8 Nov 2023 07:16:38 +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 4SQGbp12DPz4GTH for ; Wed, 8 Nov 2023 07:16:38 +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=1699427798; 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: in-reply-to:in-reply-to:references:references; bh=HWjjldD1bNcX5VlgRA7+WHbcGS1O+VsEpKWCYVhQy8E=; b=P5w7cHjYvtOTJlZwn2nwqN5B4fNe9AYeQ2cTHH3jwCbb3V7aXhGTbTfFJsyNOA7o/Aknj/ qOJqrJyDsNB7n6vYl+JKMqOlpZrtkK4AX1G0B8j4Jp+AnucPkfOw1U+ICqw2/dpcrecKiw bb3zwi8dOe1eRfl9+WVpZ/goNuL2aS5UMAkLmNvrieG2BRzAFsO76hyCNWRx5KgLV72GgK Z79BZjS6c8YMSqr5qymjqkSUNZdAMa+GczqHnrryiLzqAgVgbnzsO9CJ+j/nLhHEHZ73Sq L5nJxphRy+P0VtfxjrTKnD7boxwFb75KK3Gi4c6xKtvMQwRVFg/YXZ9jjmAhDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699427798; a=rsa-sha256; cv=none; b=YrQt0XWc9Pdd4WOHaCh0/u+YOgKxgvTS+V42d0D+1zuQjefLEoZYdUw3CtjiSnFuDeONqv ix7ra5V8MnR18meL19oK/+6FvF7zdN1w/GdqV2BlHbO7lLTikzrQWGTA34sVyQq3aRPhGs aCb/uD2FKZV0TUeRr5ELeCqHYYbVWwtIo8ApNablBVgqNBVHpcgtwinOjsqChRz7MKq4q/ CjZQvhABWTV9mjYr8sUSU5zVeBAUNll8nVwKaEw4Nk17AmOXe+RVx+PNdjWOVYqe9ESVzI uB48KzB3/La9WvCD/kodpxzK0PzPzQ+4dmLyh3fA4b/wKnCev51fH7rCk9+NVA== 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 4SQGbp07Fnz89h for ; Wed, 8 Nov 2023 07:16:38 +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 3A87GbYJ072532 for ; Wed, 8 Nov 2023 07:16:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3A87Gbha072531 for pf@FreeBSD.org; Wed, 8 Nov 2023 07:16:37 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: pf@FreeBSD.org Subject: [Bug 274915] panic immediately on loading ruleset, in pf_ioctl_addrule sha #4ffe410 Date: Wed, 08 Nov 2023 07:16:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dch@freebsd.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274915 --- Comment #5 from Dave Cottlehuber --- -- redone with src & core matching again https://git.sr.ht/~dch/src/commit/c6fd7e65435a3ea7184bbeb0e0138a4daf6d80e6 (kgdb) bt #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57 #1 doadump (textdump=3Dtextdump@entry=3D0) at /usr/src/sys/kern/kern_shutdown.c:405 #2 0xffffffff804a2a1a in db_dump (dummy=3D, dummy2=3D, dummy3=3D, dummy4=3D) at /usr/src/sys/ddb/db_command.c:591 #3 0xffffffff804a281d in db_command (last_cmdp=3D, cmd_table=3D, dopager=3Dfalse) at /usr/src/sys/ddb/db_command.c:504 #4 0xffffffff804a2966 in db_command_script (command=3Dcommand@entry=3D0xffffffff817b5724 "dump") at /usr/src/sys/ddb/db_command.c:569 #5 0xffffffff804a7f58 in db_script_exec (scriptname=3Dscriptname@entry=3D0xfffffe026a44e520 "kdb.enter.panic", warnifnotfound=3Dwarnifnotfound@entry=3D0) at /usr/src/sys/ddb/db_scrip= t.c:302 #6 0xffffffff804a7d82 in db_script_kdbenter (eventname=3D) = at /usr/src/sys/ddb/db_script.c:324 #7 0xffffffff804a5e51 in db_trap (type=3D, code=3D) at /usr/src/sys/ddb/db_main.c:267 #8 0xffffffff80b9c627 in kdb_trap (type=3Dtype@entry=3D3, code=3Dcode@entr= y=3D0, tf=3Dtf@entry=3D0xfffffe026a44e860) at /usr/src/sys/kern/subr_kdb.c:790 #9 0xffffffff8102214d in trap (frame=3D0xfffffe026a44e860) at /usr/src/sys/amd64/amd64/trap.c:608 #10 #11 kdb_enter (why=3D, msg=3D) at /usr/src/sys/kern/subr_kdb.c:556 #12 0xffffffff80b4d5b3 in vpanic (fmt=3D0xffffffff8114decf "%s", ap=3Dap@entry=3D0xfffffe026a44ea90) at /usr/src/sys/kern/kern_shutdown.c:958 #13 0xffffffff80b4d443 in panic (fmt=3D0xffffffff816b6b98 "\320\3312\201\377\377\377\377\001") at /usr/src/sys/kern/kern_shutdown.c:894 #14 0xffffffff8102260c in trap_fatal (frame=3D0xfffffe026a44eb80, eva=3D0) = at /usr/src/sys/amd64/amd64/trap.c:952 #15 0xffffffff8102265f in trap_pfault (frame=3D0xfffffe026a44eb80, usermode=3Dfalse, signo=3D, ucode=3D) at /usr/src/sys/amd64/amd64/trap.c:760 #16 #17 0xffffffff836de574 in pf_ioctl_addrule (rule=3Drule@entry=3D0xfffff80c1= 342a000, ticket=3Dticket@entry=3D2, pool_ticket=3Dpool_ticket@entry=3D196, anchor=3Danchor@entry=3D0xfffff80cbe561028 "", anchor_call=3Danchor_call@entry=3D0xfffff80cbe561030 "", uid=3D, pid=3D0) at /usr/src/sys/netpfil/pf/pf_ioctl.c:2094 #18 0xffffffff836fe730 in pf_handle_addrule (hdr=3D0xfffff80cbe561000, npt=3D0xfffffe026a44edc0) at /usr/src/sys/netpfil/pf/pf_nl.c:631 #19 0xffffffff80d94aeb in nl_receive_message (hdr=3D0xfffff80cbe561000, remaining_length=3D, nlp=3D0xfffff80161e77300, npt=3D0xfffffe026a44edc0) at /usr/src/sys/netlink/netlink_io.c:506 #20 nl_process_mbuf (m=3D0xfffff80193368a00, nlp=3D0xfffff80161e77300) at /usr/src/sys/netlink/netlink_io.c:580 #21 nl_process_received_one (nlp=3D0xfffff80161e77300) at /usr/src/sys/netlink/netlink_io.c:293 #22 nl_process_received (nlp=3D0xfffff80161e77300) at /usr/src/sys/netlink/netlink_io.c:320 #23 nl_taskqueue_handler (_arg=3D0xfffff80161e77300, pending=3D) at /usr/src/sys/netlink/netlink_io.c:371 #24 0xffffffff80bb2552 in taskqueue_run_locked (queue=3Dqueue@entry=3D0xfffff80c09004a00) at /usr/src/sys/kern/subr_taskqueue.c:512 #25 0xffffffff80bb37e2 in taskqueue_thread_loop (arg=3Darg@entry=3D0xfffff80161e77360) at /usr/src/sys/kern/subr_taskqueue.= c:824 #26 0xffffffff80b0671f in fork_exit (callout=3D0xffffffff80bb3720 , arg=3D0xfffff80161e77360, frame=3D0xfffffe026a44ef= 40) at /usr/src/sys/kern/kern_fork.c:1160 #27 (kgdb) frame 17 #17 0xffffffff836de574 in pf_ioctl_addrule (rule=3Drule@entry=3D0xfffff80c1= 342a000, ticket=3Dticket@entry=3D2, pool_ticket=3Dpool_ticket@entry=3D196, anchor=3Danchor@entry=3D0xfffff80cbe561028 "", anchor_call=3Danchor_call@entry=3D0xfffff80cbe561030 "", uid=3D, pid=3D0) at /usr/src/sys/netpfil/pf/pf_ioctl.c:2094 2094 tail =3D TAILQ_LAST(ruleset->rules[rs_num].inactive.ptr, (kgdb) l 2089 */ 2090 if (ruleset->rules[rs_num].inactive.tree =3D=3D NULL) { 2091 ERROUT(EINVAL); 2092 } 2093 2094 tail =3D TAILQ_LAST(ruleset->rules[rs_num].inactive.ptr, 2095 pf_krulequeue); 2096 if (tail) 2097 rule->nr =3D tail->nr + 1; 2098 else (kgdb) p rs_num $1 =3D (kgdb) p ruleset $2 =3D (struct pf_kruleset *) 0xfffffe00d69e4078 (kgdb) p ruleset->rules $3 =3D {{queues =3D {{tqh_first =3D 0xfffff801616ea000, tqh_last =3D 0xfffff801616ea328}, {tqh_first =3D 0x0, tqh_last =3D 0xfffffe00d69e4088}}, active =3D {ptr =3D 0xfffffe00d69e4088, ptr_array =3D 0x0, rcount =3D 0= , ticket =3D 1, open =3D 0, tree =3D 0xfffff80c850ea4d0}, inactive =3D { ptr =3D 0xfffffe00d69e4078, ptr_array =3D 0x0, rcount =3D 1, ticket = =3D 2, open =3D 1, tree =3D 0xfffff80193841180}}, {queues =3D {{ tqh_first =3D 0xfffff80be2d45000, tqh_last =3D 0xfffff80c1342a328}, {tqh_first =3D 0x0, tqh_last =3D 0xfffffe00d69e40f8}}, active =3D { ptr =3D 0xfffffe00d69e40f8, ptr_array =3D 0x0, rcount =3D 0, ticket = =3D 1, open =3D 0, tree =3D 0xfffff801617f8f60}, inactive =3D { ptr =3D 0xfffffe00d69e40e8, ptr_array =3D 0x0, rcount =3D 150, ticket= =3D 2, open =3D 1, tree =3D 0xfffff80a1889d4f0}}, {queues =3D {{ tqh_first =3D 0xfffff80a182e4800, tqh_last =3D 0xfffff8016b176328}, {tqh_first =3D 0x0, tqh_last =3D 0xfffffe00d69e4168}}, active =3D { ptr =3D 0xfffffe00d69e4168, ptr_array =3D 0x0, rcount =3D 0, ticket = =3D 1, open =3D 0, tree =3D 0xfffff80a188a4640}, inactive =3D { ptr =3D 0xfffffe00d69e4158, ptr_array =3D 0x0, rcount =3D 18, ticket = =3D 2, open =3D 1, tree =3D 0xfffff80a1889d5b0}}, {queues =3D {{ tqh_first =3D 0x0, tqh_last =3D 0xfffffe00d69e41c8}, {tqh_first =3D= 0x0, tqh_last =3D 0xfffffe00d69e41d8}}, active =3D { ptr =3D 0xfffffe00d69e41d8, ptr_array =3D 0x0, rcount =3D 0, ticket = =3D 1, open =3D 0, tree =3D 0xfffff80c850ea4e0}, inactive =3D { ptr =3D 0xfffffe00d69e41c8, ptr_array =3D 0x0, rcount =3D 0, ticket = =3D 2, open =3D 1, tree =3D 0xfffff80c850ea490}}, {queues =3D {{ tqh_first =3D 0xfffff80be2d3f800, tqh_last =3D 0xfffff80be2d3fb28}, {tqh_first =3D 0x0, tqh_last =3D 0xfffffe00d69e4248}}, active =3D { ptr =3D 0xfffffe00d69e4248, ptr_array =3D 0x0, rcount =3D 0, ticket = =3D 1, open =3D 0, tree =3D 0xfffff80cac818520}, inactive =3D { ptr =3D 0xfffffe00d69e4238, ptr_array =3D 0x0, rcount =3D 1, ticket = =3D 2, open =3D 1, tree =3D 0xfffff80a1889d530}}} (kgdb) btw see you on irc for faster RTT --=20 You are receiving this mail because: You are the assignee for the bug.=