Skip to content

lsof segfaults in FreeBSD jails #263

@utrenkner

Description

@utrenkner

Describe the bug

Earlier this month, I started to see segfaults of lsof in several FreeBSD jails. This was after updating both, the operating system to the latest patchlevel and also the lsof package.

The segmentation fault occurs, when security/rkhunter checks for possibly malicious open ports.

To Reproduce

This is an example of the lsof use by rkhunter which leads to a segmentation fault:

/usr/local/sbin/lsof -wnlP -i TCP:65535

Program output

lsof: kvm_open(execfile=/boot/kernel/kernel, corefile=/dev/mem): Invalid argument
Segmentation fault

Note, the Invalid argument can be observed in all of my jails. However, not in all of them does this lead to a segmentation fault.

Expected behavior

No segmentation fault.

Environment (please complete the following information):

OS: FreeBSD 13.1-RELEASE-p2
lsof: 4.96.4
package (from official FreeBSD quarterly repo): version 4.96.4,8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions