#1144806 lsof may crash when using -e option

Package:
lsof
Source:
lsof
Description:
utility to list open files
Submitter:
Marcin Cieslak
Date:
2026-08-19 00:03:02 UTC
Severity:
normal
Tags:
#1144806#5
Date:
2026-08-18 23:55:29 UTC
From:
To:
lsof 4.99.4+dfsg-2 seems to be affected
by the upstream bug https://github.com/lsof-org/lsof/issues/335
which is fixed in 4.99.6 upstream.

lsof 4.93.2+dfsg-1.1 from Debian 12 does not seem to be affected.

For certain NFS mounts we have,

sudo lsof -e /mnt/nfs/secondary-scratch/ +L1

works

sudo lsof -e /mnt/nfs/secondary-maps/ +L1

crashes with the following backtrace:

#0  0x000055555556f355 in process_id (ctx=ctx@entry=0x555555588910, idp=<optimized out>,
    idpl=idpl@entry=13, cmd=<optimized out>, uid=uid@entry=3119, pid=pid@entry=198786,
    ppid=1, pgid=198786, tid=0, tcmd=0x0) at lib/dialects/linux/dproc.c:1284
#1  0x0000555555571b1c in gather_proc_info (ctx=ctx@entry=0x555555588910)
    at lib/dialects/linux/dproc.c:431
#2  0x0000555555558308 in main (argc=<optimized out>, argv=<optimized out>)
    at src/main.c:1291


Downstream bug:

https://phabricator.wikimedia.org/T435262