In the Linux kernel, the following vulnerability has been resolved: netfilter: nfnetlink_osf: fix out-of-bounds read on option matching In nf_osf_match(), the nf_osf_hdr_ctx structure is initialized once and passed by reference to nf_osf_match_one() for each fingerprint checked. During TCP option parsing, nf_osf_match_one() advances the shared ctx->optp pointer. If a fingerprint perfectly matches, the function returns early without restoring ctx->optp to its initial state. If the user has configured NF_OSF_LOGLEVEL_ALL, the loop continues to the next fingerprint. However, because ctx->optp was not restored, the next call to nf_osf_match_one() starts parsing from the end of the options buffer. This causes subsequent matches to read garbage data and fail immediately, making it impossible to log more than one match or logging incorrect matches. Instead of using a shared ctx->optp pointer, pass the context as a constant pointer and use a local pointer (optp) for TCP option traversal. This makes nf_osf_match_one() strictly stateless from the caller's perspective, ensuring every fingerprint check starts at the correct option offset.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
| Attack Vector | NETWORK |
|---|---|
| Attack Complexity | LOW |
| Privileges Required | NONE |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | HIGH |
| Integrity Impact | NONE |
| Availability Impact | HIGH |
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Type: Secondary
Exploitability Score: 3.9
Impact Score: 5.2
| Source | Type | Description |
|---|---|---|
| [email protected] | Primary |
en
CWE-125
|
| Vendor | Product | Version | Update | Type |
|---|---|---|---|---|
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbe8ac0> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d23a59c9100> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbe8900> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbe82c0> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbe8d00> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbebd80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbeb500> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbe9f00> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d239fbe9e00> | Operating System |
| linux | linux_kernel | 5.0 | <built-in method update of dict object at 0x7d239fbe9cc0> | Operating System |
| linux | linux_kernel | 5.0 | <built-in method update of dict object at 0x7d235740cc80> | Operating System |
| linux | linux_kernel | 5.0 | <built-in method update of dict object at 0x7d239fbe93c0> | Operating System |
| linux | linux_kernel | 5.0 | <built-in method update of dict object at 0x7d239fbea0c0> | Operating System |
| linux | linux_kernel | 5.0 | <built-in method update of dict object at 0x7d239fbeaac0> | Operating System |
| Vulnerable | CPE |
|---|---|
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:5.0:-:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:5.0:rc5:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:5.0:rc6:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:5.0:rc7:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:5.0:rc8:*:*:*:*:*:* |