Page MenuHomeFreeBSD

syncookie_mac() ignores its 'tcp_seq irs' argument.
ClosedPublic

Authored by hiren on Jan 24 2015, 1:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 18, 9:43 AM
Unknown Object (File)
May 8 2024, 4:39 PM
Unknown Object (File)
May 8 2024, 12:57 PM
Unknown Object (File)
May 8 2024, 12:57 PM
Unknown Object (File)
May 8 2024, 12:48 PM
Unknown Object (File)
Apr 26 2024, 6:38 AM
Unknown Object (File)
Apr 26 2024, 6:23 AM
Unknown Object (File)
Dec 22 2023, 8:40 PM
Subscribers

Details

Summary

Comment on top of the code says:
The MAC is computed over (faddr||laddr||fport||lport||irs||flags||secmod)

But syncookie_mac() doesn't use 'tcp_seq irs' in computing hash.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hiren retitled this revision from to syncookie_mac() ignores its 'tcp_seq irs' argument..
hiren updated this object.
hiren edited the test plan for this revision. (Show Details)
hiren added reviewers: gnn, adrian.

How was this change tested?

In D1628#4, @gnn wrote:

How was this change tested?

Nothing specific. I am not too familiar with the code but my reading suggests that this patch should not break anything.

This patch is changing MAC value for syn cookie. Which in turn changes how we calculate hash in syncookie_generate() for iss (initial send sequence number) and compare it again when we get an ACK in syncookie_lookup().

It might be up for a debate that whether irs (initial receive sequence number) should be a part of MAC or not.

I am just trying to fix the discrepancy in comments and corresponding code.

Please correct me if needed.

gnn edited edge metadata.
This revision is now accepted and ready to land.Jan 28 2015, 5:08 AM

I plan to commit this tomorrow.

hiren updated this revision to Diff 3545.

Closed by commit rS277938 (authored by @hiren).