#1133693 mstflint device query operation segfault

Package:
mstflint
Source:
mstflint
Description:
Mellanox firmware burning application and diagnostics tools
Submitter:
Aaron D. Johnson
Date:
2026-07-12 10:29:01 UTC
Severity:
normal
#1133693#5
Date:
2026-04-13 17:46:02 UTC
From:
To:
.deb pulled from testing repository after discovering that 4.31.0+1-4 in
stable has this issue.

To reproduce:

$ lspci -v -d 15b3:; mstflint --version; sudo mstflint -d d8:00.0 q; sudo mstflint -d d8:00.0 q full
d8:00.0 Network controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]
	Subsystem: Mellanox Technologies Device 0003
	Flags: bus master, fast devsel, latency 0, IRQ 83, NUMA node 1, IOMMU group 20
	Memory at fbe00000 (64-bit, non-prefetchable) [size=1M]
	Memory at 4ffff800000 (64-bit, prefetchable) [size=8M]
	Expansion ROM at fbd00000 [disabled] [size=1M]
	Capabilities: <access denied>
	Kernel driver in use: mlx4_core
	Kernel modules: mlx4_core

mstflint, mstflint 4.33.0, Git SHA Hash: d431e08
Segmentation fault
Segmentation fault
$

This mstflint build _does_ work on image files, though:

$ mstflint --version; mstflint -i fw-ConnectX3-rel-2_42_5000-649281-B21_Bx-CLP-8025-FlexBoot-3.4.752.bin q full
mstflint, mstflint 4.33.0, Git SHA Hash: d431e08
Image type:            FS2
FW Version:            2.42.5000
FW Release Date:       5.9.2017
MIC Version:           2.0.0
Config Sectors:        1
PRS Name:              cx3-1_hp_MCX354A_fdr.prs
Product Version:       02.42.50.00
Rom Info:              version_id=8025 type=CLP
                       type=PXE version=3.4.752
Device ID:             4099
Description:           Node             Port1            Port2            Sys image
GUIDs:                 0002c9000100d050 0002c9000100d051 0002c9000100d052 0002c9000100d050
MACs:                                       0002c9000001     0002c9000002
VSD:                   n/a
PSID:                  HP_0280210019
Geographical Address:  ASIC 20
Socket Direct:         Yes
Independent Module:    Unknown
$

(I do know the above firmware image file is not the correct one for
this card.  Simply using it to illustrate that /usr/bin/mstflint is not
segfaulting for every query operation.)

mstflint 4.21.0+1-1 (from bookworm) does work as advertised when
installed on this machine:

$ lspci -v -d 15b3:; mstflint --version; sudo mstflint -d d8:00.0 q; sudo mstflint -d d8:00.0 q full
d8:00.0 Network controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]
	Subsystem: Mellanox Technologies Device 0003
	Flags: bus master, fast devsel, latency 0, IRQ 83, NUMA node 1, IOMMU group 20
	Memory at fbe00000 (64-bit, non-prefetchable) [size=1M]
	Memory at 4ffff800000 (64-bit, prefetchable) [size=8M]
	Expansion ROM at fbd00000 [disabled] [size=1M]
	Capabilities: <access denied>
	Kernel driver in use: mlx4_core
	Kernel modules: mlx4_core

mstflint, mstflint 4.21.0, Git SHA Hash: N/A
Image type:            FS2
FW Version:            2.36.5000
FW Release Date:       26.1.2016
Product Version:       02.36.50.00
Rom Info:              type=PXE version=3.4.718
Device ID:             4103
Description:           Node             Port1            Port2            Sys image
GUIDs:                 f4521403002c5e00 f4521403002c5e01 f4521403002c5e02 f4521403002c5e03
MACs:                                       f452142c5e01     f452142c5e02
VSD:
PSID:                  MT_1090111019
Image type:            FS2
FW Version:            2.36.5000
FW Release Date:       26.1.2016
MIC Version:           1.5.0
Config Sectors:        2
Product Version:       02.36.50.00
Rom Info:              type=PXE version=3.4.718
Device ID:             4103
Description:           Node             Port1            Port2            Sys image
GUIDs:                 f4521403002c5e00 f4521403002c5e01 f4521403002c5e02 f4521403002c5e03
MACs:                                       f452142c5e01     f452142c5e02
VSD:
PSID:                  MT_1090111019
$

The kernel taint reported below is due to having zfs-dkms (2.3.2-2)
modules running in this machine's kernel.

#1133693#10
Date:
2026-04-13 20:57:42 UTC
From:
To:
Continuing to poke at this a bit today.  /usr/bin/mstflint has been
stripped.  So no usefule backtrace in the core file I generated.  But
running under ltrace, I see the SIGSEGV delivered right after a
getenv("MFT_DEBUG") returns NULL.  Setting MFT_DEBUG in the process's
environment to 999999 gets at least a hint of where it was:

    $ export MFT_DEBUG=999999
    $ mstflint --version
    mstflint, mstflint 4.33.0, Git SHA Hash: d431e08
    $ sudo -E mstflint -d d8:00.0 query full
    in mtcr_pciconf_open function. mf->vsec_type: 0
    FUNCTIONAL VSC Supported
    MTCR_UL: mtcr_pciconf_open: mf->pxir_vsec_supp: 0
    Segmentation fault
    $

I do have a core file if that would help.

This hasn't stopped me getting my project done.  Running the binaries
from bookworm's mstflint 4.21.0+1-1 package got my ROM flashed.  So,
while bug is marked important for broken functionality, it is not
urgent for the submitter at all.

Thanks!

- Aaron

#1133693#15
Date:
2026-07-11 12:43:41 UTC
From:
To:
Hi,

Upstream removed support for CX3 cards in commit
52eb6c0ebbe8ad585da2a00c751260a025ad3f20:
https://github.com/Mellanox/mstflint/issues/1157

And it look like they never merged a patch to warn the user of this
issue.
So every release after 4.26.0-1 will have this issue.

The only resolution would be to package msflint 4.25.0-1 as msflint-cx3
like it is done for ssh1 compatibility.

Best regards,
NS

#1133693#20
Date:
2026-07-12 08:25:32 UTC
From:
To:
Hi,

Issue reproduced locally with Ubuntu 26.04 and its mstflint 4.33.0+1-1.1
package (I'm currently having problems installing Debian here and not
sure how to make mstflint work in a chroot).

This is a bug and I'll try to get this fixed upstream and locally.

#1133693#25
Date:
2026-07-12 10:26:35 UTC
From:
To:
Hi,

Original issue was fixed (that is: no segfault) in 4.35. So this issue
should be resolved in the next upload.

As someone who works for the same company as Upstream, I don't think I
have the time to maintain an extra fork. There is some basic
maintenance required - backporting all relevant fixes from Upstream .
4.25 would not even build.

If you want to either do that, or maintain a patch / fork on top of the
current mstflint, I'm willing to help with e.g. reviews.