TCP ISN CPU Information Leak Protection - tirdad

Starting Linux kernel 6.18.17, ISN is not created as a stand-alone value in its own function. Kernel bundles ISN and TCP timestamp offset in a 64-bit package using the same PRNG in one go. Since the ISN is stored in the lower 32-bit half of the struct, the system timer addition normally results in scaling just ISN and keeping the timestamp offset constant for a given 4-tuple input to the PRNG, although theoretically it might change both depending on the returned value from siphash. I have updated the module to account for the new changes while staying compatible with the older (currently stable) kernels. If TCP timestamp offsetting is enabled, tirdad now randomizes both fields independently in the aforementioned kernel version and later ones. If they’re disabled, ISN gets randomized as usual.

3 Likes