From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [kkdwivedi:fermata 254/348] kernel/bpf/coro.c:143 bpf_coro_frame_class() error: buffer overflow 'small' 8 <= 576460752303423487
Date: Fri, 27 Nov 2026 16:49:10 +0100 [thread overview]
Message-ID: <20261127164144.CF3Gx2AP-lkp@intel.com> (raw)
Unfiltered warning: this smatch report is sent as-is and has not been
reviewed for false positives, so please treat it with due skepticism.
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Kumar Kartikeya Dwivedi <memxor@gmail.com>
tree: https://github.com/kkdwivedi/linux fermata
head: 1d98f92a7b37670e804415b13c1d5d039706d4ce
commit: 4d3cd4b6be701549f74ad943124f4ed5bef27765 [254/348] bpf: Keep the coroutine frames that a program frees for its next ones
:::::: branch date: 9 hours ago
:::::: commit date: 11 hours ago
config: arm64-randconfig-2200-20261127 (https://download.01.org/0day-ci/archive/20261127/20261127164144.CF3Gx2AP-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 578b1f2d6a9776b63cbb6b86f4cca6208d429f48)
smatch: v0.5.0-9187-g5189e3fb
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/20261127164144.CF3Gx2AP-lkp@intel.com/
smatch warnings:
kernel/bpf/coro.c:143 bpf_coro_frame_class() error: buffer overflow 'small' 8 <= 576460752303423487
vim +/small +143 kernel/bpf/coro.c
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 131
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 132 static_assert(sizeof(struct bpf_coro_frame_hdr) + BPF_MAX_REF_SLOTS * BPF_REG_SIZE <= 1024);
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 133 static_assert(BPF_CORO_FRAME_CLASSES <=
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 134 BITS_PER_TYPE(typeof_member(struct bpf_prog_aux, coro_classes)));
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 135
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 136 /* @size is that of the header and the frame */
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 137 static unsigned int bpf_coro_frame_class(size_t size)
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 138 {
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 139 /* in steps of 32 bytes up to 256 */
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 140 static const u8 small[] = { 1, 2, 3, 4, 5, 5, 6, 6 };
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 141
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 142 if (size <= 256)
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 @143 return small[(size - 1) / 32];
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 144 return size <= 512 ? 7 : 8;
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 145 }
4d3cd4b6be7015 Kumar Kartikeya Dwivedi 2026-11-26 146
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-27 15:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261127164144.CF3Gx2AP-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.