{"api_version":"1","generated_at":"2026-07-23T15:45:29+00:00","cve":"CVE-2026-52999","urls":{"html":"https://cve.report/CVE-2026-52999","api":"https://cve.report/api/cve/CVE-2026-52999.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-52999","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-52999"},"summary":{"title":"netfilter: nfnetlink_osf: fix out-of-bounds read on option matching","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nfnetlink_osf: fix out-of-bounds read on option matching\n\nIn nf_osf_match(), the nf_osf_hdr_ctx structure is initialized once\nand passed by reference to nf_osf_match_one() for each fingerprint\nchecked. During TCP option parsing, nf_osf_match_one() advances the\nshared ctx->optp pointer.\n\nIf a fingerprint perfectly matches, the function returns early without\nrestoring ctx->optp to its initial state. If the user has configured\nNF_OSF_LOGLEVEL_ALL, the loop continues to the next fingerprint.\nHowever, because ctx->optp was not restored, the next call to\nnf_osf_match_one() starts parsing from the end of the options buffer.\nThis causes subsequent matches to read garbage data and fail\nimmediately, making it impossible to log more than one match or logging\nincorrect matches.\n\nInstead of using a shared ctx->optp pointer, pass the context as a\nconstant pointer and use a local pointer (optp) for TCP option\ntraversal. This makes nf_osf_match_one() strictly stateless from the\ncaller's perspective, ensuring every fingerprint check starts at the\ncorrect option offset.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-06-24 17:17:10","updated_at":"2026-07-15 12:54:37"},"problem_types":["CWE-125"],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"9.1","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","baseScore":9.1,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"9.1","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","data":{"baseScore":9.1,"baseSeverity":"CRITICAL","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/1c136f2c44a5913646bac85303612fd0825197a0","name":"https://git.kernel.org/stable/c/1c136f2c44a5913646bac85303612fd0825197a0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/0145548346c4a30981a870a8ca00eac46ba27e85","name":"https://git.kernel.org/stable/c/0145548346c4a30981a870a8ca00eac46ba27e85","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/edb78a142d2e5948e63647c0646aa7e7886935f0","name":"https://git.kernel.org/stable/c/edb78a142d2e5948e63647c0646aa7e7886935f0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/32e50f92c7cf3f4eba29622179a5fcdc2aebab41","name":"https://git.kernel.org/stable/c/32e50f92c7cf3f4eba29622179a5fcdc2aebab41","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/70a3f31d25cf2ec9d4ddfa408120171ead955623","name":"https://git.kernel.org/stable/c/70a3f31d25cf2ec9d4ddfa408120171ead955623","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/21883587593d7c8bb519a79460a0b5bc5ffbdabd","name":"https://git.kernel.org/stable/c/21883587593d7c8bb519a79460a0b5bc5ffbdabd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1e19a07291bb8682c14c39a64725a3ae54ab8ccc","name":"https://git.kernel.org/stable/c/1e19a07291bb8682c14c39a64725a3ae54ab8ccc","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f5ca450087c3baf3651055e7a6de92600f827af3","name":"https://git.kernel.org/stable/c/f5ca450087c3baf3651055e7a6de92600f827af3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-52999","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52999","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b 0145548346c4a30981a870a8ca00eac46ba27e85 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b 1c136f2c44a5913646bac85303612fd0825197a0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b 1e19a07291bb8682c14c39a64725a3ae54ab8ccc git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b 32e50f92c7cf3f4eba29622179a5fcdc2aebab41 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b 70a3f31d25cf2ec9d4ddfa408120171ead955623 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b 21883587593d7c8bb519a79460a0b5bc5ffbdabd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b edb78a142d2e5948e63647c0646aa7e7886935f0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1a6a0951fc009f6d9fe8ebea2d2417d80d54097b f5ca450087c3baf3651055e7a6de92600f827af3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0c1054e0e5fdef2369fb089e94def978bd209e1f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8316b60582facd4068fb0916c4db2418c21b7174 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.19.26 4.20 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.20.13 4.21 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.0","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.0 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.258 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.209 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.175 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.141 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.91 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.33 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0.10 7.0.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2026","cve_id":"52999","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"52999","cve":"CVE-2026-52999","epss":"0.005210000","percentile":"0.405810000","score_date":"2026-07-13","updated_at":"2026-07-14 00:13:16"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/netfilter/nfnetlink_osf.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"0145548346c4a30981a870a8ca00eac46ba27e85","status":"affected","version":"1a6a0951fc009f6d9fe8ebea2d2417d80d54097b","versionType":"git"},{"lessThan":"1c136f2c44a5913646bac85303612fd0825197a0","status":"affected","version":"1a6a0951fc009f6d9fe8ebea2d2417d80d54097b","versionType":"git"},{"lessThan":"1e19a07291bb8682c14c39a64725a3ae54ab8ccc","status":"affected","version":"1a6a0951fc009f6d9fe8ebea2d2417d80d54097b","versionType":"git"},{"lessThan":"32e50f92c7cf3f4eba29622179a5fcdc2aebab41","status":"affected","version":"1a6a0951fc009f6d9fe8ebea2d2417d80d54097b","versionType":"git"},{"lessThan":"70a3f31d25cf2ec9d4ddfa408120171ead955623","status":"affected","version":"1a6a0951fc009f6d9fe8ebea2d2417d80d54097b","versionType":"git"},{"lessThan":"21883587593d7c8bb519a79460a0b5bc5ffbdabd","status":"affected","version":"1a6a0951fc009f6d9fe8ebea2d2417d80d54097b","versionType":"git"},{"lessThan":"edb78a142d2e5948e63647c0646aa7e7886935f0","status":"affected","version":"1a6a0951fc009f6d9fe8ebea2d2417d80d54097b","versionType":"git"},{"lessThan":"f5ca450087c3baf3651055e7a6de92600f827af3","status":"affected","version":"1a6a0951fc009f6d9fe8ebea2d2417d80d54097b","versionType":"git"},{"status":"affected","version":"0c1054e0e5fdef2369fb089e94def978bd209e1f","versionType":"git"},{"status":"affected","version":"8316b60582facd4068fb0916c4db2418c21b7174","versionType":"git"},{"lessThan":"4.20","status":"affected","version":"4.19.26","versionType":"semver"},{"lessThan":"4.21","status":"affected","version":"4.20.13","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/netfilter/nfnetlink_osf.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.0"},{"lessThan":"5.0","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.258","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.209","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.175","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.141","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.91","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.33","versionType":"semver"},{"lessThanOrEqual":"7.0.*","status":"unaffected","version":"7.0.10","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.258","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.209","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.175","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.141","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.91","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.33","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0.10","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.1","versionStartIncluding":"5.0","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19.26","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20.13","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nfnetlink_osf: fix out-of-bounds read on option matching\n\nIn nf_osf_match(), the nf_osf_hdr_ctx structure is initialized once\nand passed by reference to nf_osf_match_one() for each fingerprint\nchecked. During TCP option parsing, nf_osf_match_one() advances the\nshared ctx->optp pointer.\n\nIf a fingerprint perfectly matches, the function returns early without\nrestoring ctx->optp to its initial state. If the user has configured\nNF_OSF_LOGLEVEL_ALL, the loop continues to the next fingerprint.\nHowever, because ctx->optp was not restored, the next call to\nnf_osf_match_one() starts parsing from the end of the options buffer.\nThis causes subsequent matches to read garbage data and fail\nimmediately, making it impossible to log more than one match or logging\nincorrect matches.\n\nInstead of using a shared ctx->optp pointer, pass the context as a\nconstant pointer and use a local pointer (optp) for TCP option\ntraversal. This makes nf_osf_match_one() strictly stateless from the\ncaller's perspective, ensuring every fingerprint check starts at the\ncorrect option offset."}],"metrics":[{"cvssV3_1":{"baseScore":9.1,"baseSeverity":"CRITICAL","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","version":"3.1"}}],"providerMetadata":{"dateUpdated":"2026-06-28T06:37:49.457Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/0145548346c4a30981a870a8ca00eac46ba27e85"},{"url":"https://git.kernel.org/stable/c/1c136f2c44a5913646bac85303612fd0825197a0"},{"url":"https://git.kernel.org/stable/c/1e19a07291bb8682c14c39a64725a3ae54ab8ccc"},{"url":"https://git.kernel.org/stable/c/32e50f92c7cf3f4eba29622179a5fcdc2aebab41"},{"url":"https://git.kernel.org/stable/c/70a3f31d25cf2ec9d4ddfa408120171ead955623"},{"url":"https://git.kernel.org/stable/c/21883587593d7c8bb519a79460a0b5bc5ffbdabd"},{"url":"https://git.kernel.org/stable/c/edb78a142d2e5948e63647c0646aa7e7886935f0"},{"url":"https://git.kernel.org/stable/c/f5ca450087c3baf3651055e7a6de92600f827af3"}],"title":"netfilter: nfnetlink_osf: fix out-of-bounds read on option matching","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-52999","datePublished":"2026-06-24T16:29:11.757Z","dateReserved":"2026-06-09T07:44:35.377Z","dateUpdated":"2026-06-28T06:37:49.457Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-06-24 17:17:10","lastModifiedDate":"2026-07-15 12:54:37","problem_types":["CWE-125"],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","baseScore":9.1,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":5.2}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19.26","versionEndExcluding":"4.20","matchCriteriaId":"93062AA3-504F-48D6-A3CD-387C194809F6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20.13","versionEndExcluding":"5.0","matchCriteriaId":"DAAFF5FD-7741-414F-8AEB-590CCD42FBBF"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0.1","versionEndExcluding":"5.10.258","matchCriteriaId":"207F231A-355F-420A-8F04-8D692D978A01"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.209","matchCriteriaId":"919C10A9-7951-4A74-BADD-C135A0A8D8B4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.1.175","matchCriteriaId":"92385813-D91D-480D-83A1-F423D2CBB2BA"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.6.141","matchCriteriaId":"97A9FFFA-22BB-4D5C-9790-5A2286E392F7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.12.91","matchCriteriaId":"C918746B-DE6F-448F-A93E-A04C5481688D"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13","versionEndExcluding":"6.18.33","matchCriteriaId":"96D99E49-380D-43AB-BDBA-25C3AD018A9C"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.0.10","matchCriteriaId":"A13475D2-59BF-4716-94B5-7C1D239A2CF4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.0:-:*:*:*:*:*:*","matchCriteriaId":"1D0FE595-0CFE-4491-808B-CEF691CE7B0A"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.0:rc5:*:*:*:*:*:*","matchCriteriaId":"C3430640-AC87-44BF-ABF5-09E0A97E3758"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.0:rc6:*:*:*:*:*:*","matchCriteriaId":"FDF49B77-4688-4908-9239-89B729456D22"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.0:rc7:*:*:*:*:*:*","matchCriteriaId":"77F342FB-3D7B-4EAE-BF8B-57B7B860BAFD"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:5.0:rc8:*:*:*:*:*:*","matchCriteriaId":"47D61679-6515-4E18-83C7-A71982CCD83C"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"52999","Ordinal":"1","Title":"netfilter: nfnetlink_osf: fix out-of-bounds read on option match","CVE":"CVE-2026-52999","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"52999","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nfnetlink_osf: fix out-of-bounds read on option matching\n\nIn nf_osf_match(), the nf_osf_hdr_ctx structure is initialized once\nand passed by reference to nf_osf_match_one() for each fingerprint\nchecked. During TCP option parsing, nf_osf_match_one() advances the\nshared ctx->optp pointer.\n\nIf a fingerprint perfectly matches, the function returns early without\nrestoring ctx->optp to its initial state. If the user has configured\nNF_OSF_LOGLEVEL_ALL, the loop continues to the next fingerprint.\nHowever, because ctx->optp was not restored, the next call to\nnf_osf_match_one() starts parsing from the end of the options buffer.\nThis causes subsequent matches to read garbage data and fail\nimmediately, making it impossible to log more than one match or logging\nincorrect matches.\n\nInstead of using a shared ctx->optp pointer, pass the context as a\nconstant pointer and use a local pointer (optp) for TCP option\ntraversal. This makes nf_osf_match_one() strictly stateless from the\ncaller's perspective, ensuring every fingerprint check starts at the\ncorrect option offset.","Type":"Description","Title":"netfilter: nfnetlink_osf: fix out-of-bounds read on option match"}]}}}