Debian (trixie kernel) 6.12.113 was allegedly patched for this bug, but there's also a .115 that's been released in the last few days, upgrade to that and reboot.
For Ubuntu (which I don't use), you'd need a 3rd party updated kernel repo, to use a patched kernel from that.
It's not an instantaneous exploit; it apparently takes a lot of iteration over the network. A lot of cloud network providers are mitigating it by dropping options at the border, but unless you test and confirm that, you should assume it's possible for a motivated-enough attacker to compromise your server.
At least for 26.04, there is a 7.0.0-43 kernel available in the -proposed repos that has the patch. Presumably planned to be made availalbe any month now.
https://wiki.ubuntu.com/Testing/EnableProposed
https://launchpad.net/ubuntu/resolute/amd64/linux-headers-ge...