Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions ext/mysqli/tests/fake_server.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1373,8 +1373,6 @@ function my_mysqli_test_stmt_response_row_over_read_status(my_mysqli_fake_server

function my_mysqli_test_stmt_response_field_len_faulty(my_mysqli_fake_server_conn $conn): void
{
$rh = $conn->packet_generator->server_stmt_execute_items_response();

$conn->send_server_greetings();
$conn->read();
$conn->send_server_ok();
Expand All @@ -1385,8 +1383,6 @@ function my_mysqli_test_stmt_response_field_len_faulty(my_mysqli_fake_server_con
$packets[2]->packet_length = '1f0000';
$conn->send($conn->packets_to_bytes($packets), "Stmt prepare items");
$conn->read();
$conn->send($conn->packets_to_bytes($rh), "Malicious Stmt Response for fields [Extract heap through buffer over-read]");
$conn->read(65536);
}

function my_mysqli_test_stmt_response_field_len_premature(my_mysqli_fake_server_conn $conn): void
Expand Down
2 changes: 0 additions & 2 deletions ext/mysqli/tests/ghsa-h35g-vwh6-m678-def.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ if ($result) {
var_dump(get_object_vars($all_fields[0])["def"]);
}

$conn->close();

$process->terminate();

print "done!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ $process->wait();
$conn = new mysqli( $servername, $username, $password, "", $process->getPort() );
echo "[*] connect_errno: ", $conn->connect_errno, "\n";

$conn->close();

$process->terminate();

print "done!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ $process->wait();
$conn = new mysqli( $servername, $username, $password, "", $process->getPort() );
echo "[*] connect_errno: ", $conn->connect_errno, "\n";

$conn->close();

$process->terminate();

print "done!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ $process->wait();
$conn = new mysqli( $servername, $username, $password, "", $process->getPort() );
echo "[*] connect_errno: ", $conn->connect_errno, "\n";

$conn->close();

$process->terminate();

print "done!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ $process->wait();

$conn = new mysqli( $servername, $username, $password, "", $process->getPort() );
echo "[*] connect_errno: ", $conn->connect_errno, "\n";
$conn->close();

$process->terminate();

print "done!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ if ($result->num_rows > 0) {
var_dump($row);
}
}
$conn->close();

$process->terminate();

print "done!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ $conn = new mysqli( $servername, $username, $password, "", $process->getPort() )
echo "[*] Preparing statement on the fake server...\n";
$conn->prepare("SELECT item FROM items");

$conn->close();

$process->terminate();
$process->terminate(true);

print "done!";
?>
Expand All @@ -35,4 +33,6 @@ print "done!";
[*] Sending - Stmt prepare items: 0c0000010001000000010000000000003000000203646566087068705f74657374056974656d73056974656d73046974656dfe6974656d0ce000c8000000fd01100000001f000003fe00000200

Warning: mysqli::prepare(): Protocol error. Server sent NULL_LENGTH. The server is faulty in %s on line %d
[*] Received: 050000001901000000
[*] Server finished
done!
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ $conn = new mysqli( $servername, $username, $password, "", $process->getPort() )
echo "[*] Preparing statement on the fake server...\n";
$conn->prepare("SELECT item FROM items");

$conn->close();

$process->terminate();
$process->terminate(true);

print "done!";
?>
Expand All @@ -39,4 +37,6 @@ Warning: mysqli::prepare(): Protocol error. Server sent false length. Expected 1
Warning: mysqli::prepare(): Premature end of data (mysqlnd_wireprotocol.c:%d) in %s on line %d

Warning: mysqli::prepare(): Result set field packet shorter than expected in %s on line %d
[*] Received: 050000001901000000
[*] Server finished
done!
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ $conn = new mysqli( $servername, $username, $password, "", $process->getPort() )
echo "[*] Preparing statement on the fake server...\n";
$conn->prepare("SELECT item FROM items");

$conn->close();

$process->terminate();

print "done!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ while ($row = $result->fetch_row()) {
$stmt->close();
$conn->close();

$process->terminate();
$process->terminate(true);

print "done!";
?>
Expand All @@ -42,4 +42,6 @@ print "done!";
[*] Sending - Malicious Stmt Response for data datval [length too short]: 01000001023200000203646566087068705f74657374046461746104646174610673747276616c0673747276616c0ce000c8000000fd01100000003200000303646566087068705f74657374046461746104646174610664617476616c0664617476616c0c3f000a0000000a811000000005000004fe00002200090000050000047465737401de05000006fe00002200

Warning: mysqli_result::fetch_row(): Malformed server packet. Field length is too short for the field type in %s on line %d
[*] Received: 0500000019010000000100000001
[*] Server finished
done!
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ while ($row = $result->fetch_row()) {
$stmt->close();
$conn->close();

$process->terminate();
$process->terminate(true);

print "done!";
?>
Expand All @@ -42,4 +42,6 @@ print "done!";
[*] Sending - Malicious Stmt Response for data dtival [length too short]: 01000001023200000203646566087068705f74657374046461746104646174610673747276616c0673747276616c0ce000c8000000fd01100000003200000303646566087068705f74657374046461746104646174610664746976616c0664746976616c0c3f00130000000c811000000005000004fe00002200090000050000047465737401de05000006fe00002200

Warning: mysqli_result::fetch_row(): Malformed server packet. Field length is too short for the field type in %s on line %d
[*] Received: 0500000019010000000100000001
[*] Server finished
done!
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ while ($row = $result->fetch_row()) {
$stmt->close();
$conn->close();

$process->terminate();
$process->terminate(true);

print "done!";
?>
Expand All @@ -42,4 +42,6 @@ print "done!";
[*] Sending - Malicious Stmt Response for data timval [length too short]: 01000001023200000203646566087068705f74657374046461746104646174610673747276616c0673747276616c0ce000c8000000fd01100000003200000303646566087068705f74657374046461746104646174610674696d76616c0674696d76616c0c3f000a0000000b811000000005000004fe00002200090000050000047465737401de05000006fe00002200

Warning: mysqli_result::fetch_row(): Malformed server packet. Field length is too short for the field type in %s on line %d
[*] Received: 0500000019010000000100000001
[*] Server finished
done!
Loading