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)
Sep 24 2024, 7:47 AM
Unknown Object (File)
Sep 23 2024, 3:05 PM
Unknown Object (File)
Sep 19 2024, 11:04 PM
Unknown Object (File)
Sep 18 2024, 2:53 AM
Unknown Object (File)
Aug 30 2024, 6:32 AM
Unknown Object (File)
Aug 30 2024, 6:25 AM
Unknown Object (File)
Aug 30 2024, 6:25 AM
Unknown Object (File)
Aug 29 2024, 3:35 AM
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).