In the Linux kernel, the following vulnerability has been resolved: bpf: Rebase the exception callback subprog when dead subprogs are removed adjust_subprog_starts_after_remove() compacts subprog_info[] and the func_info when whole subprograms are removed as dead code, but leaves env->exception_callback_subprog alone, so an exception callback declared through the exception_callback decl tag which sits behind a removed subprogram keeps its old index. jit_subprogs() then takes the exception callback from func[] at that index, which is past the end when the callback was the last subprogram, or another subprogram otherwise. Rebase the index along with the entries it refers to.
https://git.kernel.org/stable/c/8c22349f05366cd5ab04c16ed8132e570f0fe2e6
https://git.kernel.org/stable/c/8608ec8e981974b18834e2d67ed39638a9ec2e63
https://git.kernel.org/stable/c/2aea71e5eaafa8a07cd72458a5fe9d8b3d917484
https://git.kernel.org/stable/c/1969470a530e376e87e9497a00ff25e32da922e1