lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107100443.yNr9SYE7-lkp@intel.com>
Date:   Sat, 10 Jul 2021 17:51:00 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org,
        Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     lkp@...el.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [toke:xdp-queueing-01 1/3] kernel/bpf/pifomap.c:149
 pifo_map_lookup_elem() error: uninitialized symbol 'pkt'.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git xdp-queueing-01
head:   6b5756c44933d2b55e5e59e1196ef95894203cf7
commit: b8d0d0f924c237daf55b430a85007bd41ad01d7e [1/3] Add a PIFO map type for queueing packets
config: i386-randconfig-m021-20210709 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>

smatch warnings:
kernel/bpf/pifomap.c:149 pifo_map_lookup_elem() error: uninitialized symbol 'pkt'.

vim +/pkt +149 kernel/bpf/pifomap.c

b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  140  static void *pifo_map_lookup_elem(struct bpf_map *map, void *key)
b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  141  {
b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  142  	struct bpf_pifo_map *pifo = container_of(map, struct bpf_pifo_map, map);
b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  143  	struct bpf_pifo_pkt *pkt;
b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  144  	u32 pktid =  *(u32 *)key;
b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  145  
b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  146  	if (pktid < pifo->qsize)
b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  147  		pkt = &pifo->q[pktid];

Not initialized on else path.

b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  148  
b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30 @149  	return pkt ? &pkt->pkt_id : NULL;
                                                               ^^^

b8d0d0f924c237 Toke Høiland-Jørgensen 2021-06-30  150  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ