If your using the IBC in your area this would apply.
713.3.2 Membrane penetrations. Membrane penetrations shall comply with
Section 713.3.1. Where walls or partitions are required to have a
fire-resistance rating, recessed fixtures shall be installed such that the required fire-resistance will not be reduced.
Exceptions:1. Membrane penetrations of maximum 2-hour fire-resistance-rated walls and partitions by steel electrical boxes that do not exceed 16 square inches (0.0103 m
2) in area, provided the aggregate area of the openings through the membrane does not exceed 100 square inches (0.0645 m
2) in any 100 square feet (9.29 m
2) of wall area. The
annular space between the wall membrane and the box shall not exceed
1/
8 inch (3.1 mm). Such boxes on opposite sides of the wall or partition shall be separated by one of the following:
1.1. By a horizontal distance of not less than 24 inches (610 mm) where the wall or partition is constructed with individual noncommunicating stud cavities;
1.2. By a horizontal distance of not less than the depth of the wall cavity where the wall cavity is filled with cellulose loose-fill, rockwool or slag mineral wool insulation;
1.3. By solid fireblocking in accordance with
Section 717.2.1;
1.4. By protecting both outlet boxes with
listed putty pads; or
1.5. By other
listed materials and methods.
2. Membrane penetrations by
listed electrical boxes of any material, provided such boxes have been tested for use in fire-resistance-rated assemblies and are installed in accordance with the instructions included in the listing. The
annular space between the wall membrane and the box shall not exceed
1/
8 inch (3.1 mm) unless
listed otherwise. Such boxes on opposite sides of the wall or partition shall be separated by one of the following:
2.1. By the horizontal distance specified in the listing of the electrical boxes;
2.2. By solid fireblocking in accordance with
Section 717.2.1;
2.3. By protecting both boxes with
listed putty pads; or
2.4. By other
listed materials and methods.
3. Membrane penetrations by electrical boxes of any size or type, which have been
listed as part of a wall opening protective material system for use in fire-resistance-rated assemblies and are installed in accordance with the instructions included in the listing.