From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [xiang-linux:xfs/shrink_lastag 5/5] fs/xfs/xfs_error.c:308 xfs_errortag_add() error: buffer overflow 'xfs_errortag_random_default' 38 <= 38
Date: Tue, 02 Mar 2021 10:38:43 +0300 [thread overview]
Message-ID: <20210302073842.GQ2222@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git xfs/shrink_lastag
head: 95891836ec5d4d45e5fab66bff969fa3f4063d77
commit: 95891836ec5d4d45e5fab66bff969fa3f4063d77 [5/5] xfs: add error injection for per-AG resv failure
config: i386-randconfig-m021-20210301 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
fs/xfs/xfs_error.c:308 xfs_errortag_add() error: buffer overflow 'xfs_errortag_random_default' 38 <= 38
vim +/xfs_errortag_random_default +308 fs/xfs/xfs_error.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 299 int
31965ef34802f4 Darrick J. Wong 2017-06-20 300 xfs_errortag_add(
31965ef34802f4 Darrick J. Wong 2017-06-20 301 struct xfs_mount *mp,
31965ef34802f4 Darrick J. Wong 2017-06-20 302 unsigned int error_tag)
^1da177e4c3f41 Linus Torvalds 2005-04-16 303 {
31965ef34802f4 Darrick J. Wong 2017-06-20 304 if (error_tag >= XFS_ERRTAG_MAX)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
31965ef34802f4 Darrick J. Wong 2017-06-20 305 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 306
31965ef34802f4 Darrick J. Wong 2017-06-20 307 return xfs_errortag_set(mp, error_tag,
31965ef34802f4 Darrick J. Wong 2017-06-20 @308 xfs_errortag_random_default[error_tag]);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It looks like this off by one bug is fixed in commit
dd2149fbe83e ("xfs: add error injection for per-AG resv failure").
You may want to fold that in to the original commit and declare
xfs_errortag_random_default[] as having XFS_ERRTAG_MAX elements.
^1da177e4c3f41 Linus Torvalds 2005-04-16 309 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39926 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [kbuild] [xiang-linux:xfs/shrink_lastag 5/5] fs/xfs/xfs_error.c:308 xfs_errortag_add() error: buffer overflow 'xfs_errortag_random_default' 38 <= 38
Date: Tue, 02 Mar 2021 10:38:43 +0300 [thread overview]
Message-ID: <20210302073842.GQ2222@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git xfs/shrink_lastag
head: 95891836ec5d4d45e5fab66bff969fa3f4063d77
commit: 95891836ec5d4d45e5fab66bff969fa3f4063d77 [5/5] xfs: add error injection for per-AG resv failure
config: i386-randconfig-m021-20210301 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
fs/xfs/xfs_error.c:308 xfs_errortag_add() error: buffer overflow 'xfs_errortag_random_default' 38 <= 38
vim +/xfs_errortag_random_default +308 fs/xfs/xfs_error.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 299 int
31965ef34802f4 Darrick J. Wong 2017-06-20 300 xfs_errortag_add(
31965ef34802f4 Darrick J. Wong 2017-06-20 301 struct xfs_mount *mp,
31965ef34802f4 Darrick J. Wong 2017-06-20 302 unsigned int error_tag)
^1da177e4c3f41 Linus Torvalds 2005-04-16 303 {
31965ef34802f4 Darrick J. Wong 2017-06-20 304 if (error_tag >= XFS_ERRTAG_MAX)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
31965ef34802f4 Darrick J. Wong 2017-06-20 305 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 306
31965ef34802f4 Darrick J. Wong 2017-06-20 307 return xfs_errortag_set(mp, error_tag,
31965ef34802f4 Darrick J. Wong 2017-06-20 @308 xfs_errortag_random_default[error_tag]);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It looks like this off by one bug is fixed in commit
dd2149fbe83e ("xfs: add error injection for per-AG resv failure").
You may want to fold that in to the original commit and declare
xfs_errortag_random_default[] as having XFS_ERRTAG_MAX elements.
^1da177e4c3f41 Linus Torvalds 2005-04-16 309 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39926 bytes --]
next reply other threads:[~2021-03-02 7:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 7:38 Dan Carpenter [this message]
2021-03-02 7:38 ` [kbuild] [xiang-linux:xfs/shrink_lastag 5/5] fs/xfs/xfs_error.c:308 xfs_errortag_add() error: buffer overflow 'xfs_errortag_random_default' 38 <= 38 Dan Carpenter
2021-03-02 8:16 ` Gao Xiang
-- strict thread matches above, loose matches on Subject: below --
2021-03-01 17:01 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210302073842.GQ2222@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.