[Qemu-devel] [PATCH v2 0/3] restrict bridge interface name to IFNAMSIZ

P J P posted 3 patches 4 years, 10 months ago
Test docker-clang@ubuntu passed
Test s390x failed
Test asan passed
Test docker-mingw@fedora passed
Test FreeBSD passed
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190701090904.31312-1-ppandit@redhat.com
Maintainers: Jason Wang <jasowang@redhat.com>
There is a newer version of this series
net/tap.c            |  2 +-
qemu-bridge-helper.c | 23 ++++++++++++++++-------
2 files changed, 17 insertions(+), 8 deletions(-)
[Qemu-devel] [PATCH v2 0/3] restrict bridge interface name to IFNAMSIZ
Posted by P J P 4 years, 10 months ago
From: Prasad J Pandit <pjp@fedoraproject.org>

Hello,

Linux net_deivce defines network interface name to be of IFNAMSIZE(=16)
bytes, including the terminating null('\0') byte.

Qemu tap deivce, while invoking 'qemu-bridge-helper' tool to set up the
network bridge interface, supplies bridge name of 16 characters, thus
allowing to create an ACL bypass scenario.

This patch series attempts to fix it.

Thank you.
---
Prasad J Pandit (3):
  qemu-bridge-helper: restrict interface name to IFNAMSIZ
  qemu-bridge-helper: move repeating code in parse_acl_file
  net: tap: restrict bridge name to IFNAMSIZ

 net/tap.c            |  2 +-
 qemu-bridge-helper.c | 23 ++++++++++++++++-------
 2 files changed, 17 insertions(+), 8 deletions(-)

-- 
2.21.0


Re: [Qemu-devel] [PATCH v2 0/3] restrict bridge interface name to IFNAMSIZ
Posted by no-reply@patchew.org 4 years, 10 months ago
Patchew URL: https://patchew.org/QEMU/20190701090904.31312-1-ppandit@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20190701090904.31312-1-ppandit@redhat.com
Type: series
Subject: [Qemu-devel] [PATCH v2 0/3] restrict bridge interface name to IFNAMSIZ

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20190701090904.31312-1-ppandit@redhat.com -> patchew/20190701090904.31312-1-ppandit@redhat.com
Switched to a new branch 'test'
3ef9883 net: tap: restrict bridge name to IFNAMSIZ
681b23b qemu-bridge-helper: move repeating code in parse_acl_file
1293e8c qemu-bridge-helper: restrict interface name to IFNAMSIZ

=== OUTPUT BEGIN ===
1/3 Checking commit 1293e8c77f0d (qemu-bridge-helper: restrict interface name to IFNAMSIZ)
2/3 Checking commit 681b23b37e73 (qemu-bridge-helper: move repeating code in parse_acl_file)
3/3 Checking commit 3ef9883171ae (net: tap: restrict bridge name to IFNAMSIZ)
ERROR: spaces required around that '+' (ctx:VxV)
#27: FILE: net/tap.c:502:
+        char br_buf[5+IFNAMSIZ] = {0};
                      ^

total: 1 errors, 0 warnings, 8 lines checked

Patch 3/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190701090904.31312-1-ppandit@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [Qemu-devel] [PATCH v2 0/3] restrict bridge interface name to IFNAMSIZ
Posted by no-reply@patchew.org 4 years, 10 months ago
Patchew URL: https://patchew.org/QEMU/20190701090904.31312-1-ppandit@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20190701090904.31312-1-ppandit@redhat.com
Subject: [Qemu-devel] [PATCH v2 0/3] restrict bridge interface name to IFNAMSIZ
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20190621064615.20099-1-mst@redhat.com -> patchew/20190621064615.20099-1-mst@redhat.com
 - [tag update]      patchew/20190701090904.31312-1-ppandit@redhat.com -> patchew/20190701090904.31312-1-ppandit@redhat.com
 - [tag update]      patchew/20190701093034.18873-1-eric.auger@redhat.com -> patchew/20190701093034.18873-1-eric.auger@redhat.com
 - [tag update]      patchew/fc5404f7-4d1d-c28f-6e48-d8799c82acc0@web.de -> patchew/fc5404f7-4d1d-c28f-6e48-d8799c82acc0@web.de
Switched to a new branch 'test'
bb29827 net: tap: restrict bridge name to IFNAMSIZ
d7b4e94 qemu-bridge-helper: move repeating code in parse_acl_file
cced821 qemu-bridge-helper: restrict interface name to IFNAMSIZ

=== OUTPUT BEGIN ===
1/3 Checking commit cced82104140 (qemu-bridge-helper: restrict interface name to IFNAMSIZ)
2/3 Checking commit d7b4e9480bbe (qemu-bridge-helper: move repeating code in parse_acl_file)
3/3 Checking commit bb298278f680 (net: tap: restrict bridge name to IFNAMSIZ)
ERROR: spaces required around that '+' (ctx:VxV)
#27: FILE: net/tap.c:502:
+        char br_buf[5+IFNAMSIZ] = {0};
                      ^

total: 1 errors, 0 warnings, 8 lines checked

Patch 3/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190701090904.31312-1-ppandit@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com