All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Subject: Fw: [Bug 196671] New: TUN(GET/ATTACH/DETACH)FILTER ioctls fail in a x86-32 process on an x86-64 kernel
Date: Tue, 15 Aug 2017 09:15:18 -0700	[thread overview]
Message-ID: <20170815091518.07ebcbcd@xeon-e3> (raw)



Begin forwarded message:

Date: Tue, 15 Aug 2017 14:21:36 +0000
From: bugzilla-daemon@bugzilla.kernel.org
To: stephen@networkplumber.org
Subject: [Bug 196671] New: TUN(GET/ATTACH/DETACH)FILTER ioctls fail in a x86-32 process on an x86-64 kernel


https://bugzilla.kernel.org/show_bug.cgi?id=196671

            Bug ID: 196671
           Summary: TUN(GET/ATTACH/DETACH)FILTER ioctls fail in a x86-32
                    process on an x86-64 kernel
           Product: Networking
           Version: 2.5
    Kernel Version: 4.12.0 (Linus)
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Other
          Assignee: stephen@networkplumber.org
          Reporter: robert@ocallahan.org
        Regression: No

These ioctls take a 'struct sock_fprog' but there's no 32-bit compat code,
which has two consequences:

1) The ioctl numbers are incorrect for 32-bit processes running on a 64-bit
kernel. The userspace ioctl numbers use an 8-byte 'size' field but the kernel
expects a 16-byte size field, so the ioctls fail with EINVAL. You can hack
around this by handcoding the 64-bit ioctl number.

2) Userspace must supply a sock_fprog with the 64-bit layout.

Of course these workarounds assume you're running on a 64-bit kernel, so
they're no good if you might be running on a 32-bit kernel.

-- 
You are receiving this mail because:
You are the assignee for the bug.

                 reply	other threads:[~2017-08-15 16:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20170815091518.07ebcbcd@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.