OCC banks are permitted to make loans secured by own bank stock. From 12 CFR 7.2019:
(a) Permitted agreements, relating to bank shares. A national bank may require a borrower holding shares of the bank to execute agreements:
(1) Not to pledge, give away, transfer, or otherwise assign such shares;
(2) To pledge such shares at the request of the bank when necessary to prevent loss; and
(3) To leave such shares in the bank's custody.
(b) Use of capital notes and debentures. A national bank may not make loans secured by a pledge of the bank's own capital notes and debentures. Such notes and debentures must be subordinated to the claims of depositors and other creditors of the issuing bank, and are, therefore, capital instruments within the purview of 12 U.S.C. 83
There may be state law that prohibits taking your own stock as collateral. In general, the regulators have always frowned on this practice, legal or not.
--------------------------------------------------------------------------------
_________________________
The opinions expressed here are personal and do not represent opinions of my employer.