Commit 69bb9b3
committed
THRIFT-5930: c_glib: reject oversized Unix socket paths in thrift_server_socket_listen()
thrift_server_socket_listen() still copies the configured Unix socket path directly into a stack sockaddr_un and then binds it. The path comes from a GObject property and is not checked against sizeof(pin.sun_path) before the copy.\n\nReject Unix socket paths that do not fit in the local sockaddr_un.sun_path buffer before building the sockaddr and binding the socket.1 parent 3b0ab4d commit 69bb9b3
2 files changed
Lines changed: 65 additions & 2 deletions
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
52 | 74 | | |
53 | 75 | | |
54 | 76 | | |
| |||
80 | 102 | | |
81 | 103 | | |
82 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
83 | 112 | | |
84 | 113 | | |
85 | 114 | | |
| |||
374 | 403 | | |
375 | 404 | | |
376 | 405 | | |
377 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
| |||
288 | 301 | | |
289 | 302 | | |
290 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
291 | 326 | | |
292 | 327 | | |
293 | 328 | | |
| |||
355 | 390 | | |
356 | 391 | | |
357 | 392 | | |
| 393 | + | |
358 | 394 | | |
359 | 395 | | |
360 | 396 | | |
361 | | - | |
| |||
0 commit comments