From: Jan Beulich <hidden> Date: 2018-08-28 14:54:27
First and foremost the fix for XSA-270. On top of that further changes
which looked desirable to me while investigating that XSA.
1: fix input validation in xenvif_set_hash_mapping()
2: validate queue numbers in xenvif_set_hash_mapping()
3: handle page straddling in xenvif_set_hash_mapping()
Signed-off-by: Jan Beulich <redacted>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
From: Jan Beulich <hidden> Date: 2018-08-28 14:59:10
Both len and off are frontend specified values, so we need to make
sure there's no overflow when adding the two for the bounds check. We
also want to avoid undefined behavior and hence use off to index into
->hash.mapping[] only after bounds checking. This at the same time
allows to take care of not applying off twice for the bounds checking
against vif->num_queues.
It is also insufficient to bounds check copy_op.len, as this is len
truncated to 16 bits.
This is XSA-270 / CVE-2018-15471.
Reported-by: Felix Wilhelm <redacted>
Signed-off-by: Jan Beulich <redacted>
Reviewed-by: Paul Durrant <redacted>
Tested-by: Paul Durrant <redacted>
Cc: stable@vger.kernel.org [4.7 onwards]
---
drivers/net/xen-netback/hash.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
From: Jan Beulich <hidden> Date: 2018-08-28 18:51:53
Checking them before the grant copy means nothing as to the validity of
the incoming request. As we shouldn't make the new data live before
having validated it, introduce a second instance of the mapping array.
Signed-off-by: Jan Beulich <redacted>
---
drivers/net/xen-netback/common.h | 3 ++-
drivers/net/xen-netback/hash.c | 20 ++++++++++++++------
drivers/net/xen-netback/interface.c | 3 ++-
3 files changed, 18 insertions(+), 8 deletions(-)
From: Jan Beulich <hidden> Date: 2018-08-28 18:52:22
There's no guarantee that the mapping array doesn't cross a page
boundary. Use a second grant copy operation if necessary.
Signed-off-by: Jan Beulich <redacted>
---
drivers/net/xen-netback/hash.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
On Tue, Aug 28, 2018 at 08:59:45AM -0600, Jan Beulich wrote:
quoted hunk
Checking them before the grant copy means nothing as to the validity of
the incoming request. As we shouldn't make the new data live before
having validated it, introduce a second instance of the mapping array.
Signed-off-by: Jan Beulich <redacted>
---
drivers/net/xen-netback/common.h | 3 ++-
drivers/net/xen-netback/hash.c | 20 ++++++++++++++------
drivers/net/xen-netback/interface.c | 3 ++-
3 files changed, 18 insertions(+), 8 deletions(-)
Can you rename this to inactive_mapping so the code can be followed more
easily?
The code looks correct to me, but I would like Paul to have a look
before it can go in.
Wei.
On Tue, Aug 28, 2018 at 09:00:14AM -0600, Jan Beulich wrote:
There's no guarantee that the mapping array doesn't cross a page
boundary. Use a second grant copy operation if necessary.
Signed-off-by: Jan Beulich <redacted>
From: Paul Durrant <hidden> Date: 2018-09-03 13:43:12
-----Original Message-----
From: Jan Beulich [mailto:JBeulich@suse.com]
Sent: 28 August 2018 16:00
To: Paul Durrant <redacted>; Wei Liu <redacted>
Cc: davem@davemloft.net; xen-devel <redacted>;
netdev@vger.kernel.org
Subject: [PATCH 2/3] xen-netback: validate queue numbers in
xenvif_set_hash_mapping()
Checking them before the grant copy means nothing as to the validity of
the incoming request. As we shouldn't make the new data live before
having validated it, introduce a second instance of the mapping array.
Signed-off-by: Jan Beulich <redacted>
From: Paul Durrant <hidden> Date: 2018-09-03 13:48:05
-----Original Message-----
From: Jan Beulich [mailto:JBeulich@suse.com]
Sent: 28 August 2018 16:00
To: Paul Durrant <redacted>; Wei Liu <redacted>
Cc: davem@davemloft.net; xen-devel <redacted>;
netdev@vger.kernel.org
Subject: [PATCH 3/3] xen-netback: handle page straddling in
xenvif_set_hash_mapping()
There's no guarantee that the mapping array doesn't cross a page
boundary. Use a second grant copy operation if necessary.
Signed-off-by: Jan Beulich <redacted>
Personally I think it would be cleaner to out-of-line the allocation of the mapping table and ensure it is page aligned but this works so...
Reviewed-by: Paul Durrant <redacted>
From: Jan Beulich <hidden> Date: 2018-09-11 13:10:20
quoted
quoted
On 28.08.18 at 16:54, wrote:
First and foremost the fix for XSA-270. On top of that further changes
which looked desirable to me while investigating that XSA.
1: fix input validation in xenvif_set_hash_mapping()
2: validate queue numbers in xenvif_set_hash_mapping()
3: handle page straddling in xenvif_set_hash_mapping()
Signed-off-by: Jan Beulich <redacted>
What is the way forward here? I've got R-b-s from Paul for all three
patches, and a minor change request on patch 2 from Wei. I'm not
really certain what to do in this case (hints appreciated), but could
at least the security fix (patch 1) be applied immediately?
Jan
On Tue, Sep 11, 2018 at 02:12:07AM -0600, Jan Beulich wrote:
quoted
quoted
quoted
On 28.08.18 at 16:54, wrote:
First and foremost the fix for XSA-270. On top of that further changes
which looked desirable to me while investigating that XSA.
1: fix input validation in xenvif_set_hash_mapping()
2: validate queue numbers in xenvif_set_hash_mapping()
3: handle page straddling in xenvif_set_hash_mapping()
Signed-off-by: Jan Beulich <redacted>
What is the way forward here? I've got R-b-s from Paul for all three
patches, and a minor change request on patch 2 from Wei. I'm not
really certain what to do in this case (hints appreciated), but could
at least the security fix (patch 1) be applied immediately?
If you happen to resend, please make the adjustment; otherwise I'm fine
with the patches as they are. I don't want to block useful things on
cosmetic issues.
Wei.
From: Jan Beulich <hidden> Date: 2018-09-24 13:44:40
quoted
quoted
On 11.09.18 at 12:16, [off-list ref] wrote:
On Tue, Sep 11, 2018 at 02:12:07AM -0600, Jan Beulich wrote:
quoted
quoted
quoted
quoted
On 28.08.18 at 16:54, wrote:
First and foremost the fix for XSA-270. On top of that further changes
which looked desirable to me while investigating that XSA.
1: fix input validation in xenvif_set_hash_mapping()
2: validate queue numbers in xenvif_set_hash_mapping()
3: handle page straddling in xenvif_set_hash_mapping()
Signed-off-by: Jan Beulich <redacted>
What is the way forward here? I've got R-b-s from Paul for all three
patches, and a minor change request on patch 2 from Wei. I'm not
really certain what to do in this case (hints appreciated), but could
at least the security fix (patch 1) be applied immediately?
If you happen to resend, please make the adjustment; otherwise I'm fine
with the patches as they are. I don't want to block useful things on
cosmetic issues.
Dave? I notice none of the patches is in 4.19-rc5, not even the security
fix, the advisory for which had gone public over a month ago.
Jan
On Tue, Sep 11, 2018 at 02:12:07AM -0600, Jan Beulich wrote:
quoted
quoted
quoted
quoted
On 28.08.18 at 16:54, wrote:
First and foremost the fix for XSA-270. On top of that further changes
which looked desirable to me while investigating that XSA.
1: fix input validation in xenvif_set_hash_mapping()
2: validate queue numbers in xenvif_set_hash_mapping()
3: handle page straddling in xenvif_set_hash_mapping()
Signed-off-by: Jan Beulich <redacted>
What is the way forward here? I've got R-b-s from Paul for all three
patches, and a minor change request on patch 2 from Wei. I'm not
really certain what to do in this case (hints appreciated), but could
at least the security fix (patch 1) be applied immediately?
If you happen to resend, please make the adjustment; otherwise I'm fine
with the patches as they are. I don't want to block useful things on
cosmetic issues.
Dave? I notice none of the patches is in 4.19-rc5, not even the security
fix, the advisory for which had gone public over a month ago.
If it's not in my patchwork queue, you have to resend the series and
make it clear that it should be applied to the networking tree by
putting "[PATCH net N/M]" in the Subject lines.
Thank you.
From: Jan Beulich <hidden> Date: 2018-09-25 14:17:59
(re-send just to satisfy the apparent need for "net" inside the square brackets)
First and foremost the fix for XSA-270. On top of that further changes
which looked desirable to me while investigating that XSA.
1: fix input validation in xenvif_set_hash_mapping()
2: validate queue numbers in xenvif_set_hash_mapping()
3: handle page straddling in xenvif_set_hash_mapping()
Signed-off-by: Jan Beulich <redacted>
From: Jan Beulich <hidden> Date: 2018-09-25 14:18:56
Both len and off are frontend specified values, so we need to make
sure there's no overflow when adding the two for the bounds check. We
also want to avoid undefined behavior and hence use off to index into
->hash.mapping[] only after bounds checking. This at the same time
allows to take care of not applying off twice for the bounds checking
against vif->num_queues.
It is also insufficient to bounds check copy_op.len, as this is len
truncated to 16 bits.
This is XSA-270 / CVE-2018-15471.
Reported-by: Felix Wilhelm <redacted>
Signed-off-by: Jan Beulich <redacted>
Reviewed-by: Paul Durrant <redacted>
Tested-by: Paul Durrant <redacted>
Cc: stable@vger.kernel.org [4.7 onwards]
---
drivers/net/xen-netback/hash.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
From: Jan Beulich <hidden> Date: 2018-09-25 14:19:25
Checking them before the grant copy means nothing as to the validity of
the incoming request. As we shouldn't make the new data live before
having validated it, introduce a second instance of the mapping array.
Signed-off-by: Jan Beulich <redacted>
Reviewed-by: Paul Durrant <redacted>
---
drivers/net/xen-netback/common.h | 3 ++-
drivers/net/xen-netback/hash.c | 20 ++++++++++++++------
drivers/net/xen-netback/interface.c | 3 ++-
3 files changed, 18 insertions(+), 8 deletions(-)
From: Jan Beulich <hidden> Date: 2018-09-25 14:20:03
There's no guarantee that the mapping array doesn't cross a page
boundary. Use a second grant copy operation if necessary.
Signed-off-by: Jan Beulich <redacted>
Acked-by: Wei Liu <redacted>
Reviewed-by: Paul Durrant <redacted>
---
drivers/net/xen-netback/hash.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
First and foremost the fix for XSA-270. On top of that further changes
which looked desirable to me while investigating that XSA.
1: fix input validation in xenvif_set_hash_mapping()
2: validate queue numbers in xenvif_set_hash_mapping()
3: handle page straddling in xenvif_set_hash_mapping()
Signed-off-by: Jan Beulich <redacted>