Burning smell coming from vent inside car when going up a hill

Hi my 2003 Subaru Forester started doing this thing when I accelerate up a hill going around 50mph a strong burning oil/rubber smell is coming through the passenger air vent seems like the steeper the hill the stronger the odor thanks

My guess is that you have a leaking valve cover gasket that’s dripping oil onto a hot engine part when the car is angled that way. Pull over when you’re on the hill, pop the hood, and you might be able to see the smoke from that.