GNU bug report logs - #59544
[PATCH] Fixed lib-src/etags.c command execute vulnerability

Previous Next

Package: emacs;

Reported by: "lux" <lx <at> shellcodes.org>

Date: Thu, 24 Nov 2022 15:28:02 UTC

Severity: normal

Tags: patch, security

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: lux <lx <at> shellcodes.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 59544 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: bug#59544: [PATCH] Fixed lib-src/etags.c command execute vulnerability
Date: Sun, 27 Nov 2022 11:05:37 +0800
[Message part 1 (text/plain, inline)]
On 2022/11/27 01:11, Eli Zaretskii wrote:
>> Date: Sun, 27 Nov 2022 01:03:10 +0800
>> Cc: stefankangas <at> gmail.com, 59544 <at> debbugs.gnu.org
>> From: lux <lx <at> shellcodes.org>
>>
>> I'm going to add the xxx parameter. If it is true, the line break will
>> be kept. Is this logic consistent with what you expressed? thank you
>> very much.
> Much simpler:
>
> static ptrdiff_t
> readline_internal (linebuffer *lbp, FILE *stream, char const *filename, bool leave_cr)
> {
>   [...]
>        if (c == '\n')
> 	{
> 	  if (!leave_cr && p > buffer && p[-1] == '\r')
> 	    {
>   [...]
>
> IOW, when this flag is TRUE, don't process \r specially.
>
> Thanks.

Ok,  edited and added test case,  and move the patch code to the new 
function `clean_matched_file_tag`.

Thanks.
[0001-Fixed-ctags-local-command-execute-vulnerability.patch (text/x-patch, attachment)]

This bug report was last modified 2 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.