The vulnerability CVE-2022-1271 affects GNU gzip's zgrep utility. The zgrep utility is a shell script, typically named zgrep.in in the source code. Analysis of the provided URLs, especially the direct link to the fixing commit in the GNU gzip repository (https://git.savannah.gnu.org/cgit/gzip.git/commit/?id=dc9740df61e575e8c3148b7bd3c147a81ea00c7c), confirms the vulnerability and the fix. The commit message is 'zgrep: avoid exploit via multi-newline file names'. The patch shows changes to zgrep.in, specifically modifying the sed command used to escape filenames. The original sed command failed to handle filenames with multiple newlines correctly, leading to improper sanitization. This allowed crafted filenames to inject commands or alter file paths. Since zgrep is a shell script, there isn't a traditional function name as in compiled languages. The vulnerable code is a specific block within the main file-processing loop of the script. Runtime indicators would involve the zgrep script executing, which in turn calls printf and sed. The vulnerability lies in how zgrep constructs the arguments for and processes the output of these sed calls when handling filenames.
Ongoing coverage of React2Shell