Provided is a semiconductor device in which a semiconductor element mounted on a wiring substrate is placed in a hollow portion, the hollow portion being formed by the wiring substrate, a protective member, and a wall member, with the wiring substrate, the protective member, and the wall member being a bottom surface, a top surface, and side surfaces thereof, respectively. The wall member has a vent hole provided therein, which communicates the hollow portion to / from the outside, and the vent hole includes a pillar member formed of a material having a linear expansion coefficient which is smaller than that of the wall member. Therefore, airtightness of the hollow portion is maintained to prevent entry of foreign matters at ordinary temperature, and vapor pressure in the hollow portion is relieved when heated.