First of all, don't panic, Diffie-Hellman's algorithm is totally fine if used right (with right set of parameters).
Let me explain some preliminaries:
- Whats SSL/TLS Protocol?
It's the underlying protocol used in HTTPS that prevents eavesdropping and tampering of the data sent in the channel. It uses diffie-hellman protocol to exchange keys between client and server.
- What are cipher suites?
SSL/TLS protocol was made to be extensible, it is capable of using several algorithms for encrypting and signing the data, these interchangable packages are called cipher suites, you can have TLS_RSA_WITH_RC4_128_MD5 as your cipher suite which uses RSA for key exchange, RC4 for bulk data encryption and MD5 for signature.
Whats LogJam?
Now there are some of these cipher suites called EXPORT-GRADE (e.g TLS_RSA_EXPORT_WITH_RC4_40_MD5), they are intentionally weak due to US export regulations on cryptographic algorithms. These cipher suites have short key length and can easily be broken, if someone doesn't disable them on their server and the client uses them, the shared keys can be leaked and the encryption can be broken by an attacker. There was an attack on RSA named FREAK and one on Diffie-Hellman named LogJam.
Now if the client can be forced to use EXPORT-GRADE cipher suites and if the server happens to support them, an attacker can do a MITM attack by breaking the diffie-hellman algorithm due to the use of short key length. This is what LogJam is about.
There was also another vulnerability where some web servers used default diffie-hellman parameters of length 1024 which is also broken.
Note: it's all about parameters used in the algorithms, there's nothing wrong with Diffie-Hellman algorithm itself.
What to do now?
If you use modern browsers and keep them updated, by now they already prevent this attack from happening.
If you are running a webserver make sure you're using the best practices for configuring your SSL/TLS enabled versions and the underlying cipher suites.
As for the minimum key size, 1024 bits are out of reach of normal attackers, but not nation state. 2048 bit is safe. You could also use ECDHE which is diffie-hellman over elliptic curve and basically yields you the same level of security with shorter key length.