If you already replaced the hard drive you should know where the cables are and where they go. One is the SATA power cable that goes directly to the power supply and the other is the SATA data cable that goes to the motherboard.

So disconnect the data cable from the HDD and from the motherboard and buy the same length cable at any PC shop or web site. SATA data cables are standard and nothing unique. Just remember where the motherboard connector is.

Freezes can be caused by lots of different things and I'd investigate those before replacing the data cable.

Have you run the diagnostics on the RAM, which is a frequent cause of freezes? Have you reseated the RAM modules in their slots? Do you have the latest drivers, eg video driver, for your hardware?

Are there any updates to your apps and software?

Do the freezes happen when you're running a specific app? Since this seems to happen on the Linux partition is something not fully compatible with Linux..?

Agree100% with Ron. A bad SATA cable will not work at all. I actually had one. The computer would not boot, period. An intermittent failure because of an almost broken wire would be rare, as intermittent failures are usually related to something moving and giving broken wire separation and rejoining. You will need to get the new cable to sort it out. They are available in several configurations, either straight plus or 90º, based on clearance near the hard drive.