A measurement is presented of the tt¯ production cross section (σtt¯) in proton-proton collisions at a centre-of-mass energy of 7 TeV, in the all-jet final state that contains at least six jets, two of which are tagged as originating from b quarks. The data correspond to an integrated luminosity of 3.54 fb−1, collected with the CMS detector at the LHC. The cross section is determined through an unbinned maximum likelihood fit of background and tt¯ signal to the reconstructed mass spectrum of tt¯ candidates in the data, in which events are subjected to a kinematic fit assuming a tt¯→W+bW−b¯→6 jets hypothesis. The measurement yields σtt¯=139±10(stat.)±26(syst.)±3(lum.)pb , a result consistent with those obtained in other tt¯ decay channels, as well as with predictions of the standard model.