[bug report] selftests/bpf: add trusted global subprog arg tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Andrii Nakryiko,

This is a semi-automatic email about new static checker warnings.

Commit c381203eadb7 ("selftests/bpf: add trusted global subprog arg
tests") from Jan 29, 2024, leads to the following Smatch complaint:

    ./tools/testing/selftests/bpf/progs/verifier_global_ptr_args.c:88 trusted_task_arg_nonnull_fail2()
    warn: variable dereferenced before check 'nullable' (see line 86)

./tools/testing/selftests/bpf/progs/verifier_global_ptr_args.c
    85		 /* should fail, PTR_TO_BTF_ID_OR_NULL */
    86		res = subprog_trusted_task_nonnull(nullable);
                                                   ^^^^^^^^
This is dereferenced

    87	
    88		if (nullable)
                    ^^^^^^^^
NULL check is too late

    89			bpf_task_release(nullable);
    90	

regards,
dan carpenter




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux