The Vedanta Sutras, commentary by Sankaracharya (SBE34), tr. by George Thibaut [1890] at sacred-texts.com
38. And on account of the prohibition, in Smriti, of (the Sûdras') hearing and studying (the Veda) and (knowing and performing) (Vedic) matters.
The Sûdras are not qualified for that reason also that Smriti prohibits their hearing the Veda, their studying the Veda, and their understanding and performing Vedic matters. The prohibition of hearing the Veda is conveyed by the following passages: 'The ears of him who hears the Veda are to be filled with (molten) lead and lac,' and 'For a Sûdra is (like) a cemetery, therefore (the Veda) is not to be read in the vicinity of a Sûdra.' From this latter passage the prohibition of studying the Veda results at once; for how should he study Scripture in whose vicinity it is not even to be read? There is, moreover, an express prohibition (of the Sûdras studying the Veda). 'His tongue is to be slit if he pronounces it; his body is to be cut through if he preserves it.' The prohibitions of hearing and studying the Veda already imply the prohibition of the knowledge and performance of Vedic matters; there are, however, express prohibitions also, such as 'he is not to impart knowledge to the Sûdra,' and 'to the twice-born belong study, sacrifice, and the bestowal of gifts.'--From those Sûdras, however, who, like Vidura and 'the religious hunter,' acquire knowledge in consequence of the after effects of former deeds, the fruit of their knowledge cannot be withheld,
since knowledge in all cases brings about its fruit. Smriti, moreover, declares that all the four castes are qualified for acquiring the knowledge of the itihâsas and purânas; compare the passage, 'He is to teach the four castes' (Mahâbh.).--It remains, however, a settled point that they do not possess any such qualification with regard to the Veda.