The way things go in boxing at present, if 'they' want Lin and Khelif to win silvers not golds, that's what will happen.
Having [quite rightly] castigated the IBA for match-fixing, there have been some inexplicable results under IOC regulations in Paris, notably Daina Moorehouse (Ireland) losing to home-town opponent Wassila Lkhadiri (France) in the 50kg competition, when it seemed obvious that Moorehouse had won every round.
For a while there was a real-time computer-based scoring system in amateur boxing, so three out of five judges had to signal that they believed a clean punch had been landed - this was hard to 'fix'. In 2013, they went back to judges' overall scores at the end of each round - much more subjective and open to um... creative interpretation..
So if it is more politic for Khelif and Lin to lose the gold medal bout - 'look, women can beat them!' - it wouldn't be hard to arrange it. Interesting to see what happens..