Generally, a free confession to officers isn't inherently unlawful, but its acceptance in a trial is a complex matter. The key factor is whether it was obtained legally. Police must adhere to specific rules, including https://panchanandshaw.com/blog/counter-claim-explained/