From: shahab-vahedi <shahab-vahedi@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: expect 5.45.4_3: Fix the buffer overlow while logging
Date: Tue, 01 Dec 2020 14:59:36 +0100 [thread overview]
Message-ID: <20201201135936.s_l_T2wD5WZovcgHIEmZdp1HIl7DbNF5JJqwpyLckok@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26861@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]
New comment by shahab-vahedi on void-packages repository
https://github.com/void-linux/void-packages/pull/26861#issuecomment-736564215
Comment:
> Would you mind using the patch directly from fedora?
Fedora's patch is not readily usable:
```
=> expect-5.45.4_3: patching: 0004-cross-misc.patch.
=> expect-5.45.4_3: patching: 0005-fix-buf-overflow-when-logging.patch.
The text leading up to this was:
--------------------------
|diff -up expect5.45/exp_log.c.orig expect5.45/exp_log.c
|--- expect5.45/exp_log.c.orig 2013-12-12 12:43:38.527854189 +0100
|+++ expect5.45/exp_log.c 2013-12-12 12:49:26.866576387 +0100
--------------------------
File to patch:
Skip this patch? [y]
4 out of 4 hunks ignored
=> ERROR: expect-5.45.4_3: do-patch_00-patches: 'patch -sl ${_args} -i ${_patch} 2> /dev/null' exited with 1
=> ERROR: in _process_patch() at common/hooks/do-patch/00-patches.sh:34
=> ERROR: in hook() at common/hooks/do-patch/00-patches.sh:51
=> ERROR: in run_func() at common/xbps-src/shutils/common.sh:21
=> ERROR: in run_pkg_hooks() at common/xbps-src/shutils/common.sh:245
=> ERROR: in run_step() at common/xbps-src/shutils/common.sh:71
=> ERROR: in main() at common/xbps-src/libexec/xbps-src-dopatch.sh:33
```
> Also, using `vsnprintf` means you can lose information, even if it avoids the buffer overflows...
If one doesn't one to lose the data, then the `bigbuf` should be handled dynamically. That would be a more error-prone patch than this one. Given a `*** buffer overflow detected ***: expect terminated`, I think loosing the data at offsets _2000+_ should be OK.
next prev parent reply other threads:[~2020-12-01 13:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 12:20 [PR PATCH] " shahab-vahedi
2020-12-01 13:27 ` ericonr
2020-12-01 13:51 ` shahab-vahedi
2020-12-01 13:59 ` shahab-vahedi [this message]
2020-12-01 14:01 ` shahab-vahedi
2020-12-01 14:08 ` ericonr
2020-12-01 14:12 ` shahab-vahedi
2020-12-01 14:13 ` shahab-vahedi
2020-12-01 14:25 ` [PR PATCH] [Updated] " shahab-vahedi
2020-12-01 14:37 ` expect: " shahab-vahedi
2020-12-01 15:20 ` shahab-vahedi
2020-12-01 15:20 ` shahab-vahedi
2020-12-01 20:16 ` shahab-vahedi
2020-12-01 20:55 ` [PR PATCH] [Merged]: " ericonr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201201135936.s_l_T2wD5WZovcgHIEmZdp1HIl7DbNF5JJqwpyLckok@z \
--to=shahab-vahedi@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).