I realize that question is a bit arcane, but I am curious if anyone here may have some insight. There is pretty famous Russian/Cossack song called "Two brothers were going." It describes two brothers returning home from the Turkish front. According to the song on their way back they ended up near the Polish border where a Pole (or allegorically Polish soldiers) opened fire on them.
My question is what conflict could this possibly refer to? I simply can't think of a war where Russian soldiers would have fought the Turks but also had to pass through a hostile Poland.
"Poland" in the early modern period was actually the Polish-Lithuanian Commonwealth, which at its peak in 1619 was the largest country in Europe and stretched, in some respects rather nominally, from the Baltic to the Black Sea.
The lands it laid claim to included most of what is now the Ukraine and many Cossacks thus lived in an area that was under Polish suzerainty. But a minority were based within the rapidly expanding borders of Muscovy.
In reality, the control either power exacted over the southern steppes was tenuous and cossack groups took advantage of this to shift loyalties from time to time. The "Turks" the song describes the brothers fighting might have been mainstream Ottoman forces - which controlled land along the Black Sea littoral - but they might also have been Crimean Tatars, who were allies and vassals of the sultans and who raided regularly for slaves in both Polish-Lithuanian and Muscovite territory. Campaigns of this sort in the southern steppe-lands tended to be wide-ranging - a result of the lack of natural borders in the area - and by the 17th century the Muscovites were making increasing attempts to intercept and destroy Crimean slave-raiding parties. Finally, the Muscovites and the Polish-Lithuanian Commonwealth were almost invariably opposed, separated not only by competing ambitions for the western steppe and the Baltics but also by religion.
All in all, then, it's not as difficult as you might think to envisage a pro-Muscovite Cossack band fighting the Crimean Tatars or the Ottomans along the Black Sea coast and finding that the easiest way to return to their homes in Muscovy's territory was by cutting across land controlled by the Poles. More formally, Muscovy/Russia was at war with the Ottoman Empire from 1568-70, 1676-81, 1686-1700, 1710-11, and 1736-39, prior to the partitions of Poland.
This song is commonly attributed as Don Сossacks' song. Don Cossacks have appeared during late XVI-th - early XVII-th centuries (their ancestors were known as Ryazan Cossacks). First their conflict with Turkey is probably Azovskoe sidenie (Siege/Defence of Azov) in 1637-1642 (after that conflict Don Cossacks present every time as part of Russian forces, not an independent force). During Uprising of Bogdan Khmelnitsky (1648-1654) and Russo-Polish war (1654-1667) Don Cossacks fought against Poles along with Zaporozhie (Ukrainian) Cossacks. In 1672 Russo-Turkish war has stared, where most battles were on right side of Dnepr (Right-side Ukraine), which was part of Rzech Pospolita (aka Poland). Since 1672 till 1791 during almost every Russo-Turkish war there were Russian forces on Rzech Pospolita's land.
Interestingly, term "фронт" (front) took a meaning as a theatre (as it is used in a song) in late XIX-th century. Earlier it appears mostly as like a front in line formation or like a line/combatant service; "театр" or even "феатр" (theatre) was common term.