From nobody Fri Sep 20 10:21:44 2024 X-Original-To: freebsd-security@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 4X97k717rYz5VfDm for ; Fri, 20 Sep 2024 10:22:39 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from mailgate.Leidinger.net (bastille.leidinger.net [89.238.82.207]) (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 ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "E5" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X97k66Bnbz4WrC; Fri, 20 Sep 2024 10:22:38 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Authentication-Results: mx1.freebsd.org; none List-Id: Security issues List-Archive: https://lists.freebsd.org/archives/freebsd-security List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-security@freebsd.org Sender: owner-freebsd-security@FreeBSD.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1726827756; h=from:from:reply-to:subject:subject: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=UQ2wZKmPu9IZGAKAwDdZJTUfKJ9MOcvcu+6vmgBDUpU=; b=oAnb8ksvCgs9llm2Yg6FTLSFobuAihcxq4oZWZgCOn6nDFKisXn4gPGnExK6yZrm4eLCtm HtoQq7sjPJYk7o6h9bdsgzCiFybok9zyfCILbkaBQxuwEaSgxAPZ10+X8MdSU2EVqJYs7N KFq0ubb5tlTPZtMRh7X9WgaxhMqxOZM3xcU5kE6Lo5fStQrdh+Wgf1Upx9EzXTePLG/wsr kpeQhJogqg8u3Vv0l8XwgiSvbjf3wAHi1LsYFsAZcUJicm1mU6xeAtradg2MfuaUyo8sUG tQ8IZnLt/TpeMODk+GkNPwBQpyXIF4bVU4UlpM+hg3uv1/VAki3tT4qxfu3DVw== Date: Fri, 20 Sep 2024 12:21:44 +0200 From: Alexander Leidinger To: Kristof Provost Cc: FreeBSD Security list Subject: Re: "Unknown error" message from pfctl on an existing table In-Reply-To: References: Message-ID: Organization: No organization, this is a private message. Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=_b899c553f01b9787da7f2f67a168ab65"; micalg=pgp-sha256 X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34240, ipnet:89.238.64.0/18, country:DE] X-Rspamd-Queue-Id: 4X97k66Bnbz4WrC X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --=_b899c553f01b9787da7f2f67a168ab65 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Am 2024-09-20 12:00, schrieb Kristof Provost: > On 20 Sep 2024, at 10:50, Alexander Leidinger wrote: >> Hi, >> >> # pfctl -s Tables >> bruteforce >> crowdsec-blocklists >> crowdsec6-blocklists >> martians >> martians6 >> >> # pfctl -t crowdsec-blocklists -T show >> pfctl: Unknown error: -1. >> >> What could be the cause of this error? > The next debugging step would be to use ‘truss’ to see what call fails. When I list a working table (crowdsec6-blocklists): ---snip--- openat(AT_FDCWD,"/dev/pf",O_RDONLY,00) = 3 (0x3) ioctl(3,DIOCGETALTQSV1,0x233eb87dbe0) ERR#19 'Operation not supported by device' openat(AT_FDCWD,"/dev/pf",O_RDWR,00) = 4 (0x4) socket(PF_NETLINK,SOCK_RAW,16) = 5 (0x5) setsockopt(5,270,11,0x233eb87db7c,4) = 0 (0x0) getsockopt(5,SOL_SOCKET,SO_RCVBUF,0x233eb87db74,0x233eb87db78) = 0 (0x0) ioctl(3,DIOCRGETADDRS,0x233eb87d240) = 0 (0x0) ioctl(3,DIOCRGETADDRS,0x233eb87d240) = 0 (0x0) fstat(1,{ mode=-rw-r--r-- ,inode=6897,size=7721,blksize=24064 }) = 0 (0x0) 2001:620:20d0::24 2001:67c:6ec:203:192:42:116:173 2001:67c:6ec:203:192:42:116:174 ---snip--- When I list the non-working table (crowdsec-blocklists): ---snip--- openat(AT_FDCWD,"/dev/pf",O_RDONLY,00) = 3 (0x3) ioctl(3,DIOCGETALTQSV1,0x19fc93899a90) ERR#19 'Operation not supported by device' openat(AT_FDCWD,"/dev/pf",O_RDWR,00) = 4 (0x4) socket(PF_NETLINK,SOCK_RAW,16) = 5 (0x5) setsockopt(5,270,11,0x19fc93899a2c,4) = 0 (0x0) getsockopt(5,SOL_SOCKET,SO_RCVBUF,0x19fc93899a24,0x19fc93899a28) = 0 (0x0) ioctl(3,DIOCRGETADDRS,0x19fc938990f0) = 0 (0x0) ioctl(3,DIOCRGETADDRS,0x19fc938990f0) ERR#22 'Invalid argument' issetugid() = 0 (0x0) ---snip--- > I can reproduce the error message attempting to list a table that > doesn’t exist. Well... at least it shows up in the list of tables... > There’s been a bug with table name length: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279225 so perhaps > that’s what you’re running into. I can list crowdsec6-blocklists, but not crowdsec-blocklists. This is current as of 2024-09-05-105247. After looking at the PR, I should run a FreeBSD version which is not affected by this. Correct? I have this on two systems running this version of current. Bye, Alexander. -- http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_b899c553f01b9787da7f2f67a168ab65 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc; size=833 Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmbtTMkACgkQEg2wmwP4 2Ib4wA/+JZeL4oztSlvq7w7xp9C8XqLXu9wMMreaNQFyfoFXL8d3E43abTOWZb9g HoWojSpkOwbsVvdJIo6Ra/MRq5EQHMemOAHfBQ17zcr8QbPvL/vHxQ5BAnJOCwUT YBuwcukomYICx3Znqn70S1n2bqf7R1CM+fh28IPTcAE+IZronZrjP0Ed+suQ5+Qx W5NvnyKW2qtcyKx5zGJH8YFFeFOdzSza480cT6+LahJ3z0jdZgWvL4GxR/9RE9Zc D4r76c/F72tEnUoZvEibB1l5cHAaWyVLdr3U/yXO1SzXc4fNtc6GUXewULWIZVWy LpbNU3nPCz38JF4F50fHWc2Vq6LJHCRo9QhDbvACyKOWuRkHyeKZ3L9ILH1UaHyQ X3jbuXbbcc0QPs12F1nY5Ns6cUnciFfrCk4ya58Q4BNvd16uZkr7+XnoSD4HOXP0 3WneM7QTwgcpMDnQGrzOfsmiwgZkj30uqd87NlaBAzdkg3YeogTHtV8654cRqLAf U67IiHX3zc2V/QCDmp705wOoAdA2utBiqLc7spfvTFyyUb9SOJgyy5jmDu2a+MYs D3NkVYWqvk35sg3Tlf8fH4dc4tBGeLr+ME/QI55OScrEXGUDmEyEhllued1jQPPm P+pncSlKV1GSJMJZyX0h09S5gegusm2fyeK9v6NYc4WqWRii/qI= =bcco -----END PGP SIGNATURE----- --=_b899c553f01b9787da7f2f67a168ab65--