Short answer
These holes are vents used to discharge air from the primary (core/hot) flow into the secondary (bypass/cold) flow. They are normally closed by valves (variable bleed valves, VBV). The valves open to maintain the compressor pressure/flow within a safe area.
VBV in operation: Youtube

VBV on a CFM56-5 (also visible the VSV). Source
VBV are a mean to prevent a compressor stall in turbo-engines. A stall appears in situation like this:
- For some reason, e.g. when thrust is reduced, pressure at the compressor exit exceeds by a large amount its inlet pressure.
- When the pressure ratio is beyond the compressor capability, air at the exit starts opposing compressor airflow, a reverse pressure wave is created, which propagates to the inlet.
- Flow over one or more compressor blades is disturbed and the airfoil stall angle is reached creating an aerodynamic stall.
- The stall is extended to the next blades, i.e. a rotating stall develops.
- The pressure ratio is getting unstable.
- Thrust is suddenly reduced, attempts to increase thrust accelerate the stall.
The VBV are used to adjust the compressor pressure ratio, by discharging some air between the LPC and the HPC. This decreases both the pressure ratio of the LPC and HPC and helps preventing compressor stalls.
Holes location
The fan frame assembly shown here without its outer shroud:

Fan frame assembly, without its outer shroud, of a CFM56-7B. Source
comprises two rings of 12 stationary vanes which are crossed by:
- The primary (core/hot) flow for the inner vanes
- The secondary (bypass/cold) flow for the outer vanes.
The 12 holes/vents in the mid-box structure of the fan frame assembly are closed by 12 variable bleed valves (VBV):

VBV in a CFM56-5A. Source
The valves are protected by a grille:

Source
Location of these elements in the engine:

Location of the fan frame in a CFM56-5. Source
Details:

VBV on a CFM56-5. Source: CFM56-5 Training Manual
The master valve is controlled directly by a motor, the other valves are linked to the master VSV by a flexible shaft.
- 5: Fuel gear motor powered by HMU, controls position of the master VBV
- 1: Master VBV
- 2: Position feedback
- 4: Position sensor
- 7: Flexible shaft controlling the other valves
VBV use
As regard to the cold flow, the inner duct is located between the low pressure compressor (aka booster) and the high pressure compressor. The pressure delivered by the compressor section is optimized for maximum engine power.
When the engine speed is low or the engine is decelerated, the LP compressor pressure can increase and clear the LP compressor stall margin. In such a case, the VBV are opened to release some air into the secondary flow and restore the margin. Conversely, when thrust is increased, the risk of stall disappears, the valve is closed to restore efficiency. The following diagram shows how the action on the valve contributes to keep the compressor flow in the designed working area.
Stall prevention using VBV. Source
More on VBV and stall prevention:
VBV for debris rejection
On military aircraft, unsuccessful attempts have been made to use VBV to capture and reject debris and water. The principle is to create a bend in the airflow with an opening at the start of the bent section. Heavier elements are captured by the hole. CFMI has reintroduced this technique in the LEAP engine.