mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-26 01:05:56 +03:00
[GH-ISSUE #129] Is net.ipv4.tcp_timestamps=0 still relevant? #59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bob-rove on GitHub (May 24, 2022).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/129
Originally assigned to: @konstruktoid on GitHub.
I was going through all
sysctlsettings set by this tool and found an odd thing (in my personal opinion).In the past this setting was relevant to protect from server uptime guessing. But since original sec issue was fixed in kernel 4.x, is it still relevant to turn off timestamps?
To not duplicate words, I'd like to refer to a similar report of a similar tool:
https://github.com/dev-sec/ansible-collection-hardening/issues/360
@konstruktoid commented on GitHub (May 24, 2022):
Hi @bob-rove and thanks for going through the settings, and you are absolutely correct. Will remove it so the upstream default is used.
In my defense,
github.com/konstruktoid/hardening@bc42f45b68was commited some six months before the kernel update ;)@bob-rove commented on GitHub (May 25, 2022):
@konstruktoid Wow, so awesome to see such a quick reaction! And thanks a mil for confirming the case 🙇
Indeed, the issue behind TCP timestamps has a long history of not being fixed as far as I can see through the publications all over the Internet. And it's actually pretty hard to determine whether timestamps should still be disabled despite being fixed in kernel. For example, it might still be useful to keep timestamps disabled to make sure clients behind NAT are served without issues, but only in case of
net.ipv4.tcp_tw_reuse = 1. And that seems to be not a usual case anymore as at least on recent Ubuntu LTS versionnet.ipv4.tcp_tw_reuse = 2by default (ie: enabled only on loopback). Unless I'm getting things wrong 😇Anyway, was glad to contribute! 😄 I'm really excited about this project as it helps a lot to make things more secure by default, well done folks! 🚀
I assume the can be closed (leaving up to the maintainers).
@konstruktoid commented on GitHub (May 25, 2022):
Reading https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt, setting
2will result on the old ("bad") way and I should probably addnet.ipv4.tcp_timestamps=1in the future to ensure the recommended default it set.Regarding
tcp_tw_reuse: "it should not be changed without advice/request of technical experts", and sincetcp_tw_reuseandip_autobind_reuseis the only ones with that notice, I'm just going to leave it alone.I'm going to close the issue, and thank you yet again for bringing this it.
Please continue to bring up and question anything you find odd, it helps alot.