Recent results on flavor physics by CMS