The f(R) modified gravity theory can explain the accelerating expansion of the late Universe without introducing dark energy. In this study, we predict the constraint strength on the f(R) theory using the mock data generated from the Chinese Space Station Telescope (CSST) Ultra-Deep Field Type Ia supernova (SN Ia) survey and wide-field slitless spectroscopic baryon acoustic oscillation (BAO) survey. We explore three popular f(R) models and introduce a parameter b to characterize the deviation of the f(R) theory from the ΛCDM theory. The Markov Chain Monte Carlo method is employed to constrain the parameters in the f(R) models, and the nuisance parameters and systematic uncertainties are also considered in the model fitting process. Besides, we also perform model comparisons between the f(R) models and the ΛCDM model. We find that the constraint accuracy using the CSST SN Ia+BAO data set alone is comparable to or even better than the result given by the combination of the current relevant observations, and the CSST SN Ia+BAO survey can distinguish the f(R) models from the ΛCDM model. This indicates that the CSST SN Ia and BAO surveys can effectively constrain and test the f(R) theory.