Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1704959 > unrolled thread
| Started by | kys@exchange.microsoft.com |
|---|---|
| First post | 2017-08-06 22:20 +0200 |
| Last post | 2017-08-06 22:20 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/5] Drivers: hv: Miscellaneous fixes kys@exchange.microsoft.com - 2017-08-06 22:20 +0200
[PATCH 5/5] Drivers: hv: kvp: Use MAX_ADAPTER_ID_SIZE for translating adapter id kys@exchange.microsoft.com - 2017-08-06 22:20 +0200
| From | kys@exchange.microsoft.com |
|---|---|
| Date | 2017-08-06 22:20 +0200 |
| Subject | [PATCH 0/5] Drivers: hv: Miscellaneous fixes |
| Message-ID | <ubAbL-6NP-3@gated-at.bofh.it> |
From: K. Y. Srinivasan <kys@microsoft.com> Miscellaneous fixes. Alex Ng (5): Tools: hv: vss: Skip freezing filesystems backed by loop Drivers: hv: balloon: Correctly update onlined page count Drivers: hv: balloon: Show the max dynamic memory assigned Drivers: hv: balloon: Initialize last_post_time on startup Drivers: hv: kvp: Use MAX_ADAPTER_ID_SIZE for translating adapter id drivers/hv/hv_balloon.c | 12 ++++++------ drivers/hv/hv_kvp.c | 2 +- tools/hv/hv_vss_daemon.c | 7 +++++++ 3 files changed, 14 insertions(+), 7 deletions(-)
[toc] | [next] | [standalone]
| From | kys@exchange.microsoft.com |
|---|---|
| Date | 2017-08-06 22:20 +0200 |
| Subject | [PATCH 5/5] Drivers: hv: kvp: Use MAX_ADAPTER_ID_SIZE for translating adapter id |
| Message-ID | <ubAbM-6NP-17@gated-at.bofh.it> |
| In reply to | #1704959 |
From: Alex Ng <alexng@messages.microsoft.com> There's a bug which passes the output buffer size as MAX_IP_ADDR_SIZE, when converting the adapter_id field to UTF16. This is much larger than the actual size (MAX_ADAPTER_ID_SIZE). Fix this by passing the proper size. Fortunately, the translation is limited by the length of the input. This explains why we haven't seen output buffer overflow conditions. Signed-off-by: Alex Ng <alexng@messages.microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> --- drivers/hv/hv_kvp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index 9a90b91..5eed1e7 100644 --- a/drivers/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c @@ -304,7 +304,7 @@ static int process_ob_ipinfo(void *in_msg, void *out_msg, int op) strlen((char *)in->body.kvp_ip_val.adapter_id), UTF16_HOST_ENDIAN, (wchar_t *)out->kvp_ip_val.adapter_id, - MAX_IP_ADDR_SIZE); + MAX_ADAPTER_ID_SIZE); if (len < 0) return len; -- 1.7.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web