Generally, a free statement to officers isn't inherently illegal, but its use in a trial is a complex matter. The key factor is whether it was obtained legally. Police must adhere to specific procedures, including https://panchanandshaw.com/blog/consumer-vs-civil-remedy-explained/