Eating or drinking forgetfully will not invalidate the fasting, rather it will remain intact. Yes, if someone eats or drinks forgetfully and misunderstood that his fast was nullified and ate or drank intentionally, so the fast will break and he will have to perform qadha at later time.
(2) Masturbation invalidates fasting and renders qadha necessary but not kaffarah: او استمنی بکفہ ۔۔۔۔ قضی (الدر المختار)
Allah (Subhana Wa Ta’ala) knows Best
Darul Uloom Deoband