Generally, a voluntary confession to police isn't inherently illegal, but its acceptance in court is a complicated matter. The key factor is whether it was obtained properly. Police must adhere to specific procedures, https://panchanandshaw.com/blog/court-auction-procedure-explained/