Hello.
It looks like to have two external (BGP) uplinks, but don't have iBGP between R1/R2.
Also your OSPF process has a single area and 2 ASBRs (for static route, let's say "prefix A") + 2 ASBR (for BGP redistribution).
You are not redistributing from OSPF into BGP, but redistributing from BGP into OSPF.
I see no reason for routing loop, but following case.
Th only issue I could imagine if (match-any ):
- R1/R2 can reach each other via external link;
- and R1/R2 do not filter "prefix A" on inbound updates;
- and R1/R2 use different AS numbers (or ISPs are using as-override),
then in case internal link goes down (let's say on R2), then R2 will learn "prefix A" via BGP.
If internal link recovers, "prefix A" will not be installed into RIB from OSPF (due to higher AD comparing to eBGP).
So R2 have "prefix A" learnt from BGP, so it advertises "prefix A" into OSPF preocess... R1 could choose R2 if it has better OSPF metric.
Issue description adjusted.