{"id":"CVE-2026-143357","state":"PUBLISHED","title":"bpf: Don't look for the SRH again in the End.BPF helpers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't look for the SRH again in the End.BPF helpers\n\nA packet can have two SRHs. Thus input_action_end_bpf() uses\nIP6_FH_F_SKIP_RH to skip routing headers with segments_left 0. The helpers\nbpf_lwt_seg6_store_bytes() and bpf_lwt_seg6_adjust_srh() can reallocate the\nhead of the skb. Thus they look for the SRH again, but without this flag.\n\n  +------------------------+ <- the helpers: srh_state->srh\n  | SRH 1, segments_left 0 |\n  +------------------------+ <- input_action_end_bpf(): srh_state->srh\n  | SRH 2                  |    and srh_state->hdrlen\n  +------------------------+\n\nThen the helpers check offset against the wrong limits. If a helper changes\nTLVs, seg6_bpf_has_valid_srh() writes the length of SRH 2 to SRH 1.\n\nNeither helper changes the offset of the SRH from skb->data. Calculate the\nnew address from this offset. To add IP6_FH_F_SKIP_RH is not sufficient,\nbecause advance_nextseg() can set segments_left of SRH 2 to 0. The helper\nbpf_lwt_seg6_action() can change the headers and still looks for the SRH.","publishedAt":"2026-12-03T09:22:12.267Z","updatedAt":"2026-12-03T09:22:12.267Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"b94686f8c339f84ec128eb7c7939cdb546464964","versionType":"git"},{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"13424e35d033fb49b0d0f832eb668356ba9b5b27","versionType":"git"},{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"7c9fcfda8679ef648e07ba27da10c8439bebc065","versionType":"git"},{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"77593d4d83780deae9a3cc788ca88404f2949e12","versionType":"git"},{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"45bcc58d576705d2c001332766e10313f1c55bad","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/filter.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/filter.c"]}],"references":["https://git.kernel.org/stable/c/b94686f8c339f84ec128eb7c7939cdb546464964","https://git.kernel.org/stable/c/13424e35d033fb49b0d0f832eb668356ba9b5b27","https://git.kernel.org/stable/c/7c9fcfda8679ef648e07ba27da10c8439bebc065","https://git.kernel.org/stable/c/77593d4d83780deae9a3cc788ca88404f2949e12","https://git.kernel.org/stable/c/45bcc58d576705d2c001332766e10313f1c55bad"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143357.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143357","state":"PUBLISHED","datePublished":"2026-12-03T09:22:12.267Z","dateUpdated":"2026-12-03T09:22:12.267Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.370Z"},"containers":{"cna":{"title":"bpf: Don't look for the SRH again in the End.BPF helpers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't look for the SRH again in the End.BPF helpers\n\nA packet can have two SRHs. Thus input_action_end_bpf() uses\nIP6_FH_F_SKIP_RH to skip routing headers with segments_left 0. The helpers\nbpf_lwt_seg6_store_bytes() and bpf_lwt_seg6_adjust_srh() can reallocate the\nhead of the skb. Thus they look for the SRH again, but without this flag.\n\n  +------------------------+ <- the helpers: srh_state->srh\n  | SRH 1, segments_left 0 |\n  +------------------------+ <- input_action_end_bpf(): srh_state->srh\n  | SRH 2                  |    and srh_state->hdrlen\n  +------------------------+\n\nThen the helpers check offset against the wrong limits. If a helper changes\nTLVs, seg6_bpf_has_valid_srh() writes the length of SRH 2 to SRH 1.\n\nNeither helper changes the offset of the SRH from skb->data. Calculate the\nnew address from this offset. To add IP6_FH_F_SKIP_RH is not sufficient,\nbecause advance_nextseg() can set segments_left of SRH 2 to 0. The helper\nbpf_lwt_seg6_action() can change the headers and still looks for the SRH."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"b94686f8c339f84ec128eb7c7939cdb546464964","versionType":"git"},{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"13424e35d033fb49b0d0f832eb668356ba9b5b27","versionType":"git"},{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"7c9fcfda8679ef648e07ba27da10c8439bebc065","versionType":"git"},{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"77593d4d83780deae9a3cc788ca88404f2949e12","versionType":"git"},{"version":"fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0","status":"affected","lessThan":"45bcc58d576705d2c001332766e10313f1c55bad","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/filter.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"5.15.227","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/filter.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b94686f8c339f84ec128eb7c7939cdb546464964"},{"url":"https://git.kernel.org/stable/c/13424e35d033fb49b0d0f832eb668356ba9b5b27"},{"url":"https://git.kernel.org/stable/c/7c9fcfda8679ef648e07ba27da10c8439bebc065"},{"url":"https://git.kernel.org/stable/c/77593d4d83780deae9a3cc788ca88404f2949e12"},{"url":"https://git.kernel.org/stable/c/45bcc58d576705d2c001332766e10313f1c55bad"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:22:12.267Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"5.15.227"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}