[Bug 281177] 13.2 works, 13.3 and 14.x installers panic on older qlogic isp card

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281177

Joerg Pulz  changed:

   What|Removed |Added

 CC||joerg.p...@frm2.tum.de

--- Comment #3 from Joerg Pulz  ---
Created attachment 253494
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=253494&action=edit
patch to disable FTL handling on 24xx

Looks like a problem reading the FLT of your 24xx based controller.
Can't say if this is specific to your controller or to all 24xx based
controllers - can't test as this is the only controller I don't have.

Please try the attached patch - disables FLT handling for 24xx based
controllers - and let me know how this works.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 279381] FreeBSD 13.3-RELEASE breaks isp driver with Qlogic QLE2692 16Gb fibre channel cards

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279381

Joerg Pulz  changed:

   What|Removed |Added

 CC||joerg.p...@frm2.tum.de

--- Comment #5 from Joerg Pulz  ---
Can you please check if this commit

https://cgit.freebsd.org/src/commit/sys/dev/isp?id=137b004e2b7ab504abf98c4aad9d52607df47b9a

or using 13.4 helps in your case?

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281177] 13.2 works, 13.3 and 14.x installers panic on older qlogic isp card

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281177

--- Comment #4 from Yuri Pankov  ---
I have found some 2432 cards lying around, and I don't see a panic on boot
without having ispfw.ko loaded, on 15-CURRENT though:

isp0:  port 0x7000-0x70ff mem
0xb5e4-0xb5e43fff at device 0.0 numa-domain 0 on pci11
isp0: FLT[DEF]: Invalid length=0x(65535)
isp0: invalid NVRAM header (55 aa 59)
isp0: invalid NVRAM header (55 aa 59)
isp0: bad frame length (0) from NVRAM - using 1024
isp1:  port 0x6000-0x60ff mem
0xb5d4-0xb5d43fff at device 0.0 numa-domain 0 on pci12
isp1: FLT[DEF]: Invalid length=0x(65535)
isp1: invalid NVRAM header (55 aa 59)
isp1: invalid NVRAM header (55 aa 59)
isp1: bad frame length (0) from NVRAM - using 1024

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281433] Changing kern.elf64 sysctl's requires press-button reboot

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281433

Bug ID: 281433
   Summary: Changing kern.elf64 sysctl's requires press-button
reboot
   Product: Base System
   Version: 14.0-RELEASE
  Hardware: amd64
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: kern
  Assignee: b...@freebsd.org
  Reporter: dewa...@heuristicsystems.com.au

Problem: 
While trying to resolve a dlopen failure for an application, I set
sysctl kern.elf64.allow_wx=0 kern.elf64.nxstack=0

Every command subsequent to setting these variable to 0, returns:
exec_new_vmspace: mapping stack size 0x2000 prot 0x7 failed, mach error 2
errno 13
A hard reboot is required.

Reproducible:
# sysctl kern.elf64.allow_wx=0 kern.elf64.nxstack=0
# whoami
exec_new_vmspace: mapping stack size 0x2000 prot 0x7 failed, mach error 2
errno 13

Drilling down, I notice that I have
security.bsd.stack_guard_page=1

Disabling this security.bsd.stack_guard_page=0 before
sysctl kern.elf64.allow_wx=0 kern.elf64.nxstack=0
Allows the machine to perform a few (less than 3) commands before the above
exec_new_vmspace message is the only response, again requiring a hard reset.

Platforms: both development machines on Windows VirtualBox
FreeBSD14.0-p4 amd-64 (near virgin added MAC modules to kernel)
FreeBSD14.0-p5 amd-64 (modified kernel and loader.conf and sysctl.conf)

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281433] Changing kern.elf64 sysctl's requires press-button reboot

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281433

Konstantin Belousov  changed:

   What|Removed |Added

 CC||k...@freebsd.org

--- Comment #1 from Konstantin Belousov  ---
Your binaries are compiled with PT_GNU_STACK requiring executable permissions
on the stack of activated image.  The outcome is expected.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281177] 13.2 works, 13.3 and 14.x installers panic on older qlogic isp card

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281177

--- Comment #5 from Joerg Pulz  ---
Yuri,
thanks for your reply.
Would it be possible for you to test my patch, that would be really helpful.

Thanks
Joerg

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281177] 13.2 works, 13.3 and 14.x installers panic on older qlogic isp card

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281177

--- Comment #6 from Yuri Pankov  ---
(In reply to Joerg Pulz from comment #5)
Sure! With the patch output is a bit different:

isp0:  port 0x7000-0x70ff mem
0xb5e4-0xb5e43fff at device 0.0 numa-domain 0 on pci11
isp0: invalid NVRAM header (0 0 0)
isp0: invalid NVRAM header (0 0 0)
isp0: bad frame length (0) from NVRAM - using 1024
isp1:  port 0x6000-0x60ff mem
0xb5d4-0xb5d43fff at device 0.0 numa-domain 0 on pci12
isp1: invalid NVRAM header (0 0 0)
isp1: invalid NVRAM header (0 0 0)
isp1: bad frame length (0) from NVRAM - using 1024

Note that I can't test if the cards work at the moment (missing the cable) and
I have never used them with FreeBSD previously, so can't tell if something
changed.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281443] [Security] some unpatched code is in your repo

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281443

Bug ID: 281443
   Summary: [Security] some unpatched code is in your repo
   Product: Base System
   Version: Unspecified
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: bin
  Assignee: b...@freebsd.org
  Reporter: crispy.james.w...@gmail.com

Hi,
Our tool have found that this repo has remained some unfixed CVE. Some of
there are as follows:
1. `netclear` and `nextitem` functions in the file
`crypto/heimdal/appl/telnet/telnetd/utility.c` shares the similarity with the
CVE-2020-10188, the fix is
https://github.com/freebsd/freebsd-src/commit/5760cb266e0ab04c221c2acdb4b6c4c141130ecd
2. `ppp_hdlc` function in the file `contrib/tcpdump/print-ppp.c` shares the
similarity with the CVE-2020-8037, the fix is
https://github.com/the-tcpdump-group/tcpdump/commit/32027e199368dad9508965aae8cd8de5b6ab5231
3. `pass` in the file `libexec/ftpd/ftpd.c` shares the similarity with the
CVE-2020-7468, the fix is
https://github.com/freebsd/freebsd-src/commit/2ac431003bde2219848a31064a02ceecc834fead
4. `freebsd32_copyin_control` functions in the file
`sys/compat/freebsd32/freebsd32_misc.c` shares the similarity with the
CVE-2020-7460, the fix is
https://github.com/freebsd/freebsd-src/commit/1b1428dcc82b54b7a2c332680d2f66945bf9899b.
5. `BF_crypt` function in the file `contrib/apr-util/crypto/crypt_blowfish.c`
shares the similarity with the CVE-2020-1916, the fix is
https://github.com/facebook/hhvm/commit/abe0b29e4d3a610f9bc920b8be4ad8403364c2d4


**We have preliminarily verified the correctness of the above list through
static analysis. Would you can help to check if this bug is true? If it's true,
please try to fix it, or I'd like to open a PR for that if necessary. Thank you
for your effort and patience!**

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 163048] normal user cant mount ntfs-3g due to bug in mac_stub module

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=163048

Ed Maste  changed:

   What|Removed |Added

 CC||ema...@freebsd.org
  Component|amd64   |kern

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281177] 13.2 works, 13.3 and 14.x installers panic on older qlogic isp card

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281177

--- Comment #7 from Joerg Pulz  ---
(In reply to Yuri Pankov from comment #6)

Thanks for testing.
Looks like reading from the card (FLT or NVRAM) is somehow broken.
Without having one of this cards it's hard to fix this.

Yuri, you said you have found some of those cards.
Are you using those or is it possible to get one from you?
I would pay for the card and shipping costs - if you attend EuroBSDcon next
week, we could do the handover there.

Joerg

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281443] [Security] some unpatched code is in your repo

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281443

Ed Maste  changed:

   What|Removed |Added

 CC||ema...@freebsd.org

--- Comment #1 from Ed Maste  ---
Please indicate which version(s) of FreeBSD you investigated with your tool

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281433] Changing kern.elf64 sysctl's requires press-button reboot

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281433

Ed Maste  changed:

   What|Removed |Added

 CC||ema...@freebsd.org

--- Comment #2 from Ed Maste  ---
In a default configuration base system components are compatible with
allow_wx=0; trying your example on my laptop (on main):

# sysctl kern.elf64.allow_wx=0 kern.elf64.nxstack=0
kern.elf64.allow_wx: 1 -> 0
kern.elf64.nxstack: 1 -> 0
# whoami
root

Is this whoami from 14.0-RELEASE media, or did you build it?

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281177] 13.2 works, 13.3 and 14.x installers panic on older qlogic isp card

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281177

--- Comment #8 from Yuri Pankov  ---
I was able to reproduce the panic without Joerg's diff removing isp from kernel
config and kldload'ing it after boot, hopefully this is a bit more readable:

isp0:  port 0x7000-0x70ff mem
0xb5e4-0xb5e43fff at device 0.0 numa-domain 0 on pci11
isp0: FLT[DEF]: Invalid length=0x(65535)
Kernel page fault with the following non-sleepable locks held:
exclusive sleep mutex isp (isp) r = 0 (0xf80004af5800) locked @
/home/yuri/ws/isp/sys/dev/isp/isp_pci.c:1096
stack backtrace:

Fatal trap 12: page fault while in kernel mode
cpuid = 17; apic id = 09
fault virtual address   = 0xfe01f793f000
fault code  = supervisor write data, page not present
instruction pointer = 0x20:0x832f59f2
stack pointer   = 0x28:0xfe01f793d690
frame pointer   = 0x28:0xfe01f794d6e0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 196 (kldload)
rdi: f80004af5800 rsi: 0004 rdx: f800b5e40004
rcx: c0c97e2e00dd  r8: c0c97e2d707e  r9: f800081a5740
rax:  rbx: f80004af5800 rbp: fe01f794d6e0
r10: 001d r11: 001d r12: 7530
r13: 065c r14: 7ff11a5e r15: fe01f793f000
trap number = 12
panic: page fault
cpuid = 17
time = 1726098938
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe01f793d360
vpanic() at vpanic+0x13f/frame 0xfe01f793d490
panic() at panic+0x43/frame 0xfe01f793d4f0
trap_fatal() at trap_fatal+0x40b/frame 0xfe01f793d550
trap_pfault() at trap_pfault+0xa0/frame 0xfe01f793d5c0
calltrap() at calltrap+0x8/frame 0xfe01f793d5c0
--- trap 0xc, rip = 0x832f59f2, rsp = 0xfe01f793d690, rbp =
0xfe01f794d6e0 ---
isp_read_flt_2xxx() at isp_read_flt_2xxx+0x562/frame 0xfe01f794d6e0
isp_reset() at isp_reset+0x646/frame 0xfe01f794d7e0
isp_reinit() at isp_reinit+0xea/frame 0xfe01f794d890
isp_pci_attach() at isp_pci_attach+0xff4/frame 0xfe01f794d930
device_attach() at device_attach+0x3aa/frame 0xfe01f794d970
device_probe_and_attach() at device_probe_and_attach+0x70/frame
0xfe01f794d9a0
pci_driver_added() at pci_driver_added+0xf2/frame 0xfe01f794d9e0
devclass_driver_added() at devclass_driver_added+0x29/frame 0xfe01f794da10
devclass_add_driver() at devclass_add_driver+0x138/frame 0xfe01f794da50
module_register_init() at module_register_init+0xb0/frame 0xfe01f794da80
linker_load_module() at linker_load_module+0xc23/frame 0xfe01f794dd80
kern_kldload() at kern_kldload+0x16e/frame 0xfe01f794ddd0
sys_kldload() at sys_kldload+0x5c/frame 0xfe01f794de00
amd64_syscall() at amd64_syscall+0x158/frame 0xfe01f794df30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfe01f794df30
--- syscall (304, FreeBSD ELF64, kldload), rip = 0x3c38ff72f7da, rsp =
0x3c38fcd188b8, rbp = 0x3c38fcd18e30 ---
Uptime: 42s
Dumping 2546 out of 65179 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281433] Changing kern.elf64 sysctl's requires press-button reboot

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281433

--- Comment #3 from dewa...@heuristicsystems.com.au ---
(In reply to Konstantin Belousov from comment #1)
I'm really impressed that you were able to identify the problem, and so
quickly.  Thank-you.  Could you provide a hint how I can fix?

So that I can disable this feature, I need to find where/how PT_GNU_STACK is
revealed on my 14.0 boxes using clang version 16.0.6, LLD 16.0.6. My futile
attempts involved:

# objdump -T -t `which whoami`|grep -i  -e stack -e gnu
  DO *UND*   (FBSD_1.0)   __stack_chk_guard
  DF *UND*   (FBSD_1.0)   __stack_chk_fail

# readelf -a `which whoami` |grep -i  -e stack -e gnu -e id
  GNU_RELRO  0x2540 0x4540 0x4540
  GNU_EH_FRAME   0x14ac 0x14ac 0x14ac
  GNU_STACK  0x 0x 0x
...
27:  0 OBJECT  GLOBAL DEFAULT  UND
__stack_chk_guard@FBSD_1.0 (3)
31:  0 FUNCGLOBAL DEFAULT  UND
__stack_chk_fail@FBSD_1.0 (3)
  GNU   0x0010  NT_GNU_BUILD_ID (Build id set by ld(1))
   Build ID: ef0defaeb38f943913d65e8474989b1c

# objdump -T -t  /libexec/ld-elf.so.1 | grep -i  -e stack -e gnu -e id
e260 gDF .text  0007  FBSDprivate_1.0
_rtld_get_stack_prot

Nothing helpful.  (I also tried hd and ktrace)

So is there a clue from my /etc/make*.conf
# make -C /usr/src -VCFLAGS -Vspace -VLDFLAGS
-O2 -pipe -march=haswell -fomit-frame-pointer -fno-signed-zeros -g0 -ggdb0
-DSTRIP_FBSDID -UDEBUGGING -DNDEBUG -Qunused-arguments
-Wno-error=unused-command-line-argument -Wno-error=unknown-warning-option
-fno-common -fno-asynchronous-unwind-tables -Wl,-zrelro -Wl,-znow
-Wl,--strip-debug -Wl,--build-id=md5 -Wl,--hash-style=sysv -DPIC -fpie

-Wl,-zrelro -Wl,-znow -Wl,--strip-debug -Wl,--build-id=md5
-Wl,--hash-style=sysv -pie

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281443] [Security] some unpatched code is in your repo

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281443

Mark Linimon  changed:

   What|Removed |Added

Product|Base System |Security
  Component|bin |Base
  Group||freebsd_committer
Version|Unspecified |unspecified

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 281433] Changing kern.elf64 sysctl's requires press-button reboot

2024-09-11 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281433

--- Comment #4 from dewa...@heuristicsystems.com.au ---
(In reply to Ed Maste from comment #2)
Thank-you for demonstrating success.

I've tracked stable branches since FSBD3, but with 14 switched to releng
branches.

I'm migrating from 12.4S system to 14.0.  I pull the release kit down as the
base, then build from source. 

I'm trying to identify the problem on a system built in Jan 2024, because its
as close to virgin as I've got - meaning I don't include any of the
customisations to the kernel or source other than via make.conf, src.conf and
additions/subtractions to GENERIC kernel config, which the MAC_ inclusions
demonstrate.  I'm hoping that Konstantin can provide insight as to how he
recognised the problem so I can resolve. I hope its not MAC related as we use
quite a few MAC modules and employ the BIBA model (yes with multilabel ;))

I chanced upon this problem while trying to identify a (self inflicted) dlopen
problem via LDFLAGS+= -Wl,-z,nodlopen (tsk)

-- 
You are receiving this mail because:
You are the assignee for the bug.