  We present the 78-ks Chandra observations of the $z=6.4$ quasar SDSS
J1148+5251. The source is clearly detected in the energy range 0.3-7 keV with
42 counts (with a significance $\gtrsim9\sigma$). The X-ray spectrum is
best-fitted by a power-law with photon index $\Gamma=1.9$ absorbed by a gas
column density of $\rm N_{\rm H}=2.0^{+2.0}_{-1.5}\times10^{23}\,\rm cm^{-2}$.
We measure an intrinsic luminosity at 2-10 keV and 10-40 keV equal to $\sim
1.5\times 10^{45}~\rm erg~s^{-1}$, comparable with luminous local and
intermediate-redshift quasar properties. Moreover, the X-ray to optical
power-law slope value ($\alpha_{\rm OX}=-1.76\pm 0.14$) of J1148 is consistent
with the one found in quasars with similar rest-frame 2500 \AA ~luminosity
($L_{\rm 2500}\sim 10^{32}~\rm erg~s^{-1}$\AA$^{-1}$). Then we use Chandra data
to test a physically motivated model that computes the intrinsic X-ray flux
emitted by a quasar starting from the properties of the powering black hole and
assuming that X-ray emission is attenuated by intervening, metal-rich ($Z\geq
\rm Z_{\odot}$) molecular clouds distributed on $\sim$kpc scales in the host
galaxy. Our analysis favors a black hole mass $M_{\rm BH} \sim 3\times 10^9 \rm
M_\odot$ and a molecular hydrogen mass $M_{\rm H_2}\sim 2\times 10^{10} \rm
M_\odot$, in good agreement with estimates obtained from previous studies. We
finally discuss strengths and limits of our analysis.
