I have a French passport with a valid H1B visa stamped and work in the US. The H1B is valid until 2025. I'm flying for work from the US to France on October 1st, and when I fly back my passport will have slightly below 6 months of validity -- 170 days instead of 180 days. It's also tough to get a new passport on time for October 1st. Will I be denied reentry into the US on October 5th?
A nonimmigrant is inadmissible under 8 USC 1182(a)(7)(B)(i)(I) unless they have a passport valid until 6 months after the end of their period of admission. What this means in practice is that for people with passports from countries not on the "6-month club", their passport must be valid for at least 6 months at the time of entry, and the admit-until date on their I-94 will be no later than 6 months before their passport expires. For people with passports from countries on the 6-month club, their passport must be valid for any length at the time of entry, and the admit-until date on their I-94 will be no later than their passport expiration date.
Since you are using a French passport, and France is in the 6-month club, you can enter the US with a passport of less than 6 months of validity left. However, note that you will be admitted on your I-94 to no later than your passport expiration date. If you wish to stay longer than that, either 1) your employer would have to file another I-129 for H1b extension, or 2) you would have to leave and re-enter the US on a new passport (you would not need to get a new visa on the new passport, since a valid US visa in an expired passport can be used in combination with a valid passport from the same country).
This is as far as the US government is concerned. It is possible that the airline and/or originating country may have stricter requirements for passport validity.
The 6-month rule does not apply to citizens of France. See this PDF.