Skip to content

connectivity: Add timeout option for socks proxies - #1

Closed
nferch wants to merge 1 commit into
OpenVPN:masterfrom
nferch:socks-proxy-timeout
Closed

nferch wants to merge 1 commit into
OpenVPN:masterfrom
nferch:socks-proxy-timeout

Conversation

@nferch

@nferch nferch commented Dec 16, 2012

Copy link
Copy Markdown

No description provided.

@ngharo

ngharo commented Aug 22, 2013

Copy link
Copy Markdown

Greetings,

I fowarded this patch along to the openvpn-devel mailing list for review. I'll try to keep this request updated with any additional information. Note that the patch against doc/openvpn.8 did not merge cleanly with the current master. I fixed this in the submission to the mailing list.

I also put it in the Wiki under list of patches to be reviewed.
https://community.openvpn.net/openvpn/wiki/Patches

For reference, the mailing list thread
http://article.gmane.org/gmane.network.openvpn.devel/7841

@schwabe

schwabe commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

I think my proposed patch (http://mid.gmane.org/[email protected]) implements this in a better way.

@cron2

cron2 commented Feb 15, 2016

Copy link
Copy Markdown
Contributor

@schwabe is this already solved in some way, or will it be solved as soon as The Big Timeout Patch is merged?

@schwabe

schwabe commented Feb 15, 2016

Copy link
Copy Markdown
Contributor

@cron2 No the timeout patch removes the socks-proxy-timeout and integrates it into the big timeout

@dsommers

Copy link
Copy Markdown
Member

As I understand it, commit f2134b7 seems to be resolving this issue. So closing this one.

@dsommers dsommers closed this Aug 17, 2016
@dsommers dsommers changed the title Add timeout option for socks proxies connectivity: Add timeout option for socks proxies Aug 17, 2016
cron2 pushed a commit that referenced this pull request May 21, 2023
At the moment if --name is not specified, adapter names
are generated by Windows and they look a bit confusing
like "Local Area Connection 2".

This is also behavior of "Add a new <driver-name> virtual network
adapter" shortcuts.

This makes tapctl generate driver-specific names for adapters
if --name is missing, inclusing resolving duplicates. For instance
following commands:

  tapctl.exe create --hwid ovpn-dco

will create an adapter named

  OpenVPN Data Channel Offload

If the name is taken, the next one will be

  OpenVPN Data Channel Offload #1

and so on up to 100.

Fixes #337

Change-Id: Ic5afb470d14ac7b231d91f0f5de0a0046043a7e0
Signed-off-by: Lev Stipakov <[email protected]>
Acked-by: Selva Nair <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg26712.html
Signed-off-by: Gert Doering <[email protected]>
(cherry picked from commit 4323b82)
cron2 pushed a commit that referenced this pull request May 21, 2023
At the moment if --name is not specified, adapter names
are generated by Windows and they look a bit confusing
like "Local Area Connection 2".

This is also behavior of "Add a new <driver-name> virtual network
adapter" shortcuts.

This makes tapctl generate driver-specific names for adapters
if --name is missing, inclusing resolving duplicates. For instance
following commands:

  tapctl.exe create --hwid ovpn-dco

will create an adapter named

  OpenVPN Data Channel Offload

If the name is taken, the next one will be

  OpenVPN Data Channel Offload #1

and so on up to 100.

Fixes #337

Change-Id: Ic5afb470d14ac7b231d91f0f5de0a0046043a7e0
Signed-off-by: Lev Stipakov <[email protected]>
Acked-by: Selva Nair <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg26712.html
Signed-off-by: Gert Doering <[email protected]>
flichtenheld referenced this pull request in flichtenheld/openvpn Jul 28, 2023
Coverity: CID 1539183 (#1 of 1): Structurally dead code (UNREACHABLE)

Change-Id: I889de8bafb581b810a026c7359fbfee94f1b5a4e
Signed-off-by: Frank Lichtenheld <[email protected]>
flichtenheld referenced this pull request in flichtenheld/openvpn Jul 28, 2023
The return value of add_bypass_routes overwrites
the return value of add_route3 instead of combining
them.

Coverity: CID 1539180 (#1 of 1): Unused value (UNUSED_VALUE)

Change-Id: I78f92f363fe203af5661c6958b2417ea30f7055c
Signed-off-by: Frank Lichtenheld <[email protected]>
cron2 pushed a commit that referenced this pull request Aug 11, 2023
cron2 pushed a commit that referenced this pull request Aug 11, 2023
cron2 pushed a commit that referenced this pull request Aug 11, 2023
The return value of add_bypass_routes overwrites
the return value of add_route3 instead of combining
them.

Coverity: CID 1539180 (#1 of 1): Unused value (UNUSED_VALUE)

Change-Id: I78f92f363fe203af5661c6958b2417ea30f7055c
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg26900.html
Signed-off-by: Gert Doering <[email protected]>
cron2 pushed a commit that referenced this pull request Aug 11, 2023
The return value of add_bypass_routes overwrites
the return value of add_route3 instead of combining
them.

Coverity: CID 1539180 (#1 of 1): Unused value (UNUSED_VALUE)

Change-Id: I78f92f363fe203af5661c6958b2417ea30f7055c
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg26900.html
Signed-off-by: Gert Doering <[email protected]>
(cherry picked from commit 8067cc8)
aiburegit pushed a commit to aiburegit/openvpn that referenced this pull request Oct 26, 2026
optimal_fragment_size() computes mfs_aligned by masking off the low
FRAG_SIZE_ROUND_MASK bits of max_frag_size and then divides len by it.
When max_frag_size is in {0,1,2,3} the masked value becomes 0 and the
process is killed by SIGFPE.

frame->max_fragment_size is derived from --fragment minus the data
channel overhead (see frame_calculate_fragment() in mss.c). The existing
"--fragment needs to be at least 68" check in options.c only validates
the raw option value, not the effective max_fragment_size after the CBC
overhead (padding, IV, HMAC and the long-form packet id) has been
subtracted. A valid, if deprecated, configuration such as

    --secret static.key --cipher AES-256-CBC --auth SHA256 --fragment 68

(non-TLS static key mode, enabled with
--allow-deprecated-insecure-static-crypto) yields max_fragment_size == 3
and crashes on the first outgoing data packet:

    Program received signal SIGFPE, Arithmetic exception.
    optimal_fragment_size (len=16, max_frag_size=3) at fragment.c
    OpenVPN#1  fragment_outgoing ()
    OpenVPN#2  encrypt_sign ()
    OpenVPN#3  check_ping_send_dowork ()

This is the same division-by-zero reached through other code paths in
GitHub issues OpenVPN#400 (recalculation missing on reconnect) and OpenVPN#417 (PMTU
of zero), both addressed with targeted fixes. Guard the division itself
so that any path producing a too-small max_fragment_size degrades
gracefully (the caller's MAX_FRAGS check then rejects the datagram)
instead of crashing. The guard is unreachable for any sane
max_fragment_size, so normal fragmentation is unchanged.

Signed-off-by: Artem Krasovskiy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants