In the Linux kernel, the following vulnerability has been resolved: bpf: Fix invalid prog->stats access when updateeffectiveprogs fails Syzkaller triggers an invalid memory access issue following fault injection in updateeffectiveprogs. The issue can be described as follows: cgroupbpfdetach updateeffectiveprogs computeeffectiveprogs bpfprogarrayalloc <-- fault inject purgeeffectiveprogs /* change to dummybpfprog / array->items[index] = &dummybpfprog.prog ---softirq start--- __do_softirq ... __cgroupbpfrunfilterskb __bpfprogrunsavecb bpfprogrun stats = thiscpuptr(prog->stats) / invalid memory access */ flags = u64statsupdatebeginirqsave(&stats->syncp) ---softirq end--- staticbranchdec(&cgroupbpfenabledkey[atype]) The reason is that fault injection caused updateeffectiveprogs to fail and then changed the original prog into dummybpfprog.prog in purgeeffectiveprogs. Then a softirq came, and accessing the members of dummybpfprog.prog in the softirq triggers invalid mem access. To fix it, skip updating stats when stats is NULL.