fix: an IPv4 route metric of 2^31 or more makes the Linux link read fail
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- linux, rust
- Domain
- networking
Research direction
Locate the Linux link reader that parses rows from /proc/net/route and the metric column it currently reads as a signed 32-bit value; the related work in #492 touches the same reader. Change that parse to u32 and add reader contract cases for a metric of 2^31 and of 2^32 − 1 alongside the existing ones. Done when those cases pass and a default route with metric 4294967295 no longer makes the link read fail.
Written by the indexing model from the issue text.
Description
Found while fixing #492, and already on main.
The Linux link reader parses each /proc/net/route row's metric as a signed 32-bit number, so a default route whose IPv4 metric is 2^31 or more makes the whole link read fail. Every location rule then fails to evaluate, so the location isn't tried. That's the safe direction, but wrong: the kernel stores the metric as an unsigned 32-bit number, and ip route add default … metric 4294967295 is accepted.
Fix: parse the metric as u32, with a reader contract case for a metric of 2^31 and of 2^32 − 1.
Low priority: no network manager sets such metrics by default.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 56m
- Merged PRs (30d)
- 349
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nledford/Ladderback
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nledford/Ladderback#809 ·
Maintainers usually reply within 1 day
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nledford/Ladderback#759 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nledford/Ladderback#746 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nledford/Ladderback#745 ·
Maintainers usually reply within 1 day
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nledford/Ladderback#637 · 1 comment ·
Maintainers usually reply within 1 day
All issues in nledford/Ladderback
Similar issues
-
benchmark-review
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
area:filesystem bug need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Captions panel does not offer to show an existing transcriptPossibly taken @thedavidweng claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CapSoftware/Cap#4276 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
libracoder/kiri#364 ·
Maintainers usually reply within 1 day