(1) soliciting, accepting or embezzling the property of criminals and their relatives;
(2) Releasing a criminal privately or neglecting his duty, causing the criminal to escape;
(3) extorting confessions by torture or maltreating criminals by corporal punishment;
(4) Insulting the criminal's personality;
(5) Beating or conniving at others beating criminals;
(six) using criminals to provide services for personal gain;
(seven) in violation of regulations, privately delivering letters or articles for criminals;
(eight) illegally handing over the supervision of criminals to others;
(9) Other illegal acts.
If the prison people's police commit the acts listed in the preceding paragraph, which constitutes a crime, they shall be investigated for criminal responsibility according to law; If it does not constitute a crime, it shall be given administrative sanctions.
Handing notes and the like can easily be judged as violating regulations, and delivering letters or articles for criminals without permission. So it's illegal.
legal ground
Article 14 of the Prison Law, the people's police of a prison shall not commit any of the following acts:
(1) soliciting, accepting or embezzling the property of criminals and their relatives;
(2) Releasing a criminal privately or neglecting his duty to cause the criminal to escape;
(3) extorting confessions by torture or maltreating criminals by corporal punishment;
(4) Insulting the criminal's personality;
(5) Beating or conniving at others beating criminals;
(six) using criminals to provide services for personal gain;
(seven) in violation of regulations, privately delivering letters or articles for criminals;
(eight) illegally handing over the supervision of criminals to others;
(9) Other illegal acts.
If the prison people's police commit the acts listed in the preceding paragraph, which constitutes a crime, they shall be investigated for criminal responsibility according to law; If it does not constitute a crime, it shall be given administrative sanctions.