From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [bpf-next:master 24/51] kernel/bpf/precision.c:66 bpf_insn_callee() error: buffer overflow 'aux->const_reg_vals' 10 <= 16
Date: Sat, 21 Nov 2026 12:21:22 +0100 [thread overview]
Message-ID: <20261121121608.NYDAtCSJ-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: Alexei Starovoitov <ast@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
head: 9867c61abbd44f7053a871566b3d982f62c6d8dc
commit: 37e13b091537b2e41b85a2f362e6defece1ed351 [24/51] bpf: Find the xregs that an unproven insn depends on
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
config: parisc-randconfig-2200-20261121 (https://download.01.org/0day-ci/archive/20261121/20261121121608.NYDAtCSJ-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 16.2.0
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/20261121121608.NYDAtCSJ-lkp@intel.com/
smatch warnings:
kernel/bpf/precision.c:66 bpf_insn_callee() error: buffer overflow 'aux->const_reg_vals' 10 <= 16
vim +66 kernel/bpf/precision.c
37e13b091537b2 Alexei Starovoitov 2026-11-20 54
37e13b091537b2 Alexei Starovoitov 2026-11-20 55 /* The function that the insn at @idx calls, or hands to a helper. -1 if that is not known. */
37e13b091537b2 Alexei Starovoitov 2026-11-20 56 int bpf_insn_callee(struct bpf_verifier_env *env, int idx)
37e13b091537b2 Alexei Starovoitov 2026-11-20 57 {
37e13b091537b2 Alexei Starovoitov 2026-11-20 58 struct bpf_insn_aux_data *aux = &env->insn_aux_data[idx];
37e13b091537b2 Alexei Starovoitov 2026-11-20 59 struct bpf_insn *insn = &env->prog->insnsi[idx];
37e13b091537b2 Alexei Starovoitov 2026-11-20 60 u16 funcs = aux->const_reg_subprog_mask & aux->use_regs;
37e13b091537b2 Alexei Starovoitov 2026-11-20 61
37e13b091537b2 Alexei Starovoitov 2026-11-20 62 if (bpf_pseudo_call(insn))
37e13b091537b2 Alexei Starovoitov 2026-11-20 63 return bpf_find_subprog(env, idx + insn->imm + 1);
37e13b091537b2 Alexei Starovoitov 2026-11-20 64 if (hweight16(funcs) == 1 && (aux->calls_callback ||
37e13b091537b2 Alexei Starovoitov 2026-11-20 65 bpf_is_async_callback_calling_insn(insn)))
37e13b091537b2 Alexei Starovoitov 2026-11-20 @66 return aux->const_reg_vals[__ffs(funcs)];
37e13b091537b2 Alexei Starovoitov 2026-11-20 67 return -1;
37e13b091537b2 Alexei Starovoitov 2026-11-20 68 }
37e13b091537b2 Alexei Starovoitov 2026-11-20 69
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-21 11:21 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=20261121121608.NYDAtCSJ-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.