NH_Clark has it right. On arrival in GRU you will walk down the glass corridor on the outside of the waiting area, clear through a very light security screen and be let out right into the departure gate area. C&I is in Rio.
If 843 is running late, they usually will hold 861. On the off chance they don't, they will bus you to the Sao Paolo Congonhas airport to take a TAM flight to Santos Dumont airport in downtown Rio.
I was hit with that once - that tight connection is enough to make me want to fly via IAD, if only the connections to PDX were better. But barring a major delay in ORD, you should be fine.