In Magento this will happen when you have created a duplicate product(product : 3) from a product(product : 2) and then you add product:2 as up-sell/cross-sell/related product of any other product(product : 1) in system.
So now in newly created product (product : 3) will have same sku as in product(product : 2) and remains in disable status until you make any changes in it.
Now in this situation when you try to save product (product : 1), Magento will check its all up-sell/cross-sell/related and because product 3 and 2 has same sku and product:3 is not related with product:1 Magento produces this error.
To resolve this error just do one thing open product:3 and change its sku the error will be gone.
Following your error : Product with SKU 'abc' is not linked to product with SKU 'def', try to search product with 'abc' sku probably you will get more than one products in magento, so just change sku of one of them.
Hope this will resolve the issue.