arcress0 / ipmiutil

ipmiutil is an easy to use set of IPMI server management utilities. It can get/set sensor readings & thresholds, automate SEL management, do SOL console, etc. Supports Linux, Windows, BSD, Solaris, MacOSX. The only IPMI project tool that runs natively on Windows. See http://ipmiutil.sf.net for rpms, etc. (formerly called panicsel). It can run driverless in Linux for use on boot media or embedded environments.
BSD 3-Clause "New" or "Revised" License
33 stars 5 forks source link

Fail to dump FRU bin file by IPMIUTIL command #15

Open vien20010 opened 1 year ago

vien20010 commented 1 year ago

Steps to reproduce:

Run ipmiutil command to dump FRU

ipmiutil fru -d <fru.bin>

Expected result:

Successfully dump FRU file

Actual result:

Got segmentation fault when dump FRU

Analysis: frubuf is only malloc from load_fru function but ipmiutil doesn't call this function or malloc frubuf before fwrite --> segmentation fault. image

arcress0 commented 1 year ago

Sorry. That got broken when ifru.c changed to malloc() the fru buffer rather than being statically declared. This needs to change to leverage pfrubuf rather than frubuf.

arcress0 commented 9 months ago

07/05/2023 ARCress ipmiutil-3.1.9-2 changes lib/lanplus/lanplus.c - GH13: hpm netfn2c/cmd34 error, bridge netfn06,07/cmd34 doc/ipmiutil.spec - GH17: do not abort if sensor command fails util/isensor.c - GH17: if MALFORMED, not fatal, show message before correct 08/03/2023 ARCress ipmiutil-3.1.9-3 util/ifru.c - GH15: fails to dump FRU with -d (added load_fru for fdump) util/ilan.c - GH14: GH14: user set password fails w 0xCC, upriv = rd3 & 0x0F

See https://ipmiutil.sourceforge.net/FILES/ipmiutil-3.1.9-3.tar.gz and https://ipmiutil.sourceforge.net/FILES/ipmiutil-3.1.9-3.el7.x86_64.rpm for a version that fixes this issue. This will be applied to github soon.