public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Sanity check for m_ialloc_blks in libxfs_mount()
@ 2019-10-16 19:08 "Marc Schönefeld"
  2019-10-16 20:28 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: "Marc Schönefeld" @ 2019-10-16 19:08 UTC (permalink / raw)
  To: linux-xfs

Hi all, 

it looks like there is a sanity check missing for the divisor (m_ialloc_blks) in line 664 of xfsprogs-5.2.1/libxfs/init.c: 
Program received signal SIGFPE, Arithmetic exception.

0x0000000000427ddf in libxfs_mount (mp=mp@entry=0x6a2de0 <xmount>, sb=sb@entry=0x6a2de0 <xmount>, dev=18446744073709551615, 
    logdev=<optimized out>, rtdev=<optimized out>, flags=flags@entry=1) at init.c:663

which is 

    663                 mp->m_maxicount = XFS_FSB_TO_INO(mp,
    664                                 (mp->m_maxicount / mp->m_ialloc_blks) *
    665                                  mp->m_ialloc_blks);

In case it would be required I have a reproducer file for this, which I can share via pm. The bug is reachable from user input via the "xfs_db -c _cmd_ _xfsfile_" command.   

Sincerely
Marc Schoenefeld 
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-16 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-16 19:08 Sanity check for m_ialloc_blks in libxfs_mount() "Marc Schönefeld"
2019-10-16 20:28 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox