Public bug reported:

Affects: linux-nvidia (Ubuntu Resolute), linux-nvidia-bos (Ubuntu Resolute)
FYI: linux (Ubuntu Resolute) carries the same selftest and is also affected

[Impact]

Two BPF selftests fail on every run, though the verifier rejects both programs
as intended:

    verifier_ptr_to_buf/PTR_TO_BUF: reject negative const offset
    verifier_raw_tp_writable/raw_tracepoint_writable: reject negative const 
offset

The 2026-08-20 stable update (LP: #2164666) backported upstream selftest
6f59deb32efa without its kernel change fd4cfa8c8f9a. The tests expect the
message that fd4cfa8c8f9a added, but 7.0 prints its older message:

    expected: invalid negative rdwr buffer offset
    got:      R2 invalid rdwr buffer access: off=-8, size=8

First affected: linux 7.0.0-37.37, linux-nvidia 7.0.0-1021.21,
linux-nvidia-bos 7.0.0-2020.20.

[Fix]

Change the two __msg() strings to the 7.0 wording:

    tools/testing/selftests/bpf/progs/verifier_ptr_to_buf.c
      __msg("R2 invalid rdwr buffer access: off=-8, size=8")
    tools/testing/selftests/bpf/progs/verifier_raw_tp_writable.c
      __msg("R6 invalid tracepoint buffer access: off=-8, size=8")

Don't backport fd4cfa8c8f9a. It fixes 022ac0750883 (v7.1-rc1), which is not
in 7.0, so 7.0 does not have the bug it fixes.

[Test Plan]

Build the BPF selftests against the kernel under test, then:

    ./test_progs -t
verifier_ptr_to_buf,verifier_raw_tp_writable,raw_tp_writable_reject_bad_access

Bad:  both subtests above FAIL on expect_msg; Summary: 1/3 PASSED, 2 FAILED.
Good: Summary: 3/5 PASSED, 0 FAILED.

[Where problems could occur]

Selftest-only change. The tests still require the load to be rejected. If
022ac0750883 and fd4cfa8c8f9a are ever backported to 7.0, the verifier will
print the upstream message, and this patch must be reverted.

** Affects: linux-nvidia-7.0 (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux-nvidia-bos (Ubuntu)
     Importance: Undecided
         Status: New

** Project changed: kernel-sru-workflow => linux-nvidia-7.0 (Ubuntu)

** Also affects: linux-nvidia-bos (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2170741

Title:
  [linux-nvidia]: selftests/bpf: verifier_ptr_to_buf and
  verifier_raw_tp_writable fail on 7.0 (selftest backported without its
  kernel change)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-7.0/+bug/2170741/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to