Whamcloud - gitweb
filefrag: avoid temporary buffer overflow
authorAndreas Dilger <adilger@dilger.ca>
Thu, 29 Mar 2018 18:36:54 +0000 (12:36 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Apr 2018 15:33:58 +0000 (11:33 -0400)
commit346db5ddf222fef3c9a88676e55f2f38527838e4
treebff3290114ffaadc58ef8ace60b014a5c1917e30
parent4ec98780067ec292efb64fde2c98833a4ed35ac4
filefrag: avoid temporary buffer overflow

If an unknown flag is present in a FIEMAP extent, it is printed as a
hex value into a temporary buffer before adding it to the flags.  If
that unknown flag is over 0xfff then it will overflow the temporary
buffer.

Reported-by: Sarah Liu <wei3.liu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10335
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 17a1f2c1929630e3a79e6b98168d56f96acf2e8b)
misc/filefrag.c