linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.3k stars 1.01k forks source link

Add test for argc == 0 #911

Closed metan-ucw closed 2 years ago

metan-ucw commented 2 years ago

See:

https://lwn.net/Articles/882799/

The kernel devs are still trying to figure out solution, the latest discussion is at: https://lwn.net/ml/linux-kernel/20220127000724.15106-1-ariadne@dereferenced.org/

Looks like the latest idea would be to add an empty string as argv[0] if program passed zero arguments.

The whole idea here is to fix somehow exec() with empty argv list in order to fix whole class of CVEs like the polkit one CVE-2021-4034 see also https://lwn.net/Articles/882609