diff --git a/include/buffer.hpp b/include/buffer.hpp
index 54d197e..a44e504 100644
--- a/include/buffer.hpp
+++ b/include/buffer.hpp
@@ -14,6 +14,7 @@
 
 /* Adding endianness */
 using boost::endian::little_uint16_t;
+using boost::endian::little_uint24_t;
 using boost::endian::little_uint32_t;
 using boost::endian::little_uint64_t;
 
@@ -33,14 +34,14 @@
     little_uint32_t bmcInterfaceVersion;        // Offset 0x0
     little_uint32_t biosInterfaceVersion;       // Offset 0x4
     std::array<little_uint32_t, 4> magicNumber; // Offset 0x8
-    little_uint16_t queueSize;                  // Offset 0x18
-    little_uint16_t ueRegionSize;               // Offset 0x1a
-    little_uint32_t bmcFlags;                   // Offset 0x1c
-    little_uint16_t bmcReadPtr;                 // Offset 0x20
-    std::array<uint8_t, 6> reserved1;           // Offset 0x22
+    little_uint24_t queueSize;                  // Offset 0x18
+    little_uint16_t ueRegionSize;               // Offset 0x1b
+    little_uint32_t bmcFlags;                   // Offset 0x1d
+    little_uint24_t bmcReadPtr;                 // Offset 0x21
+    std::array<uint8_t, 4> reserved1;           // Offset 0x24
     little_uint32_t biosFlags;                  // Offset 0x28
-    little_uint16_t biosWritePtr;               // Offset 0x2c
-    std::array<uint8_t, 2> reserved2;           // Offset 0x2e
+    little_uint24_t biosWritePtr;               // Offset 0x2c
+    uint8_t reserved2;                          // Offset 0x2f
     // UE reserved region:                         Offset 0x30
     // Error log queue:       Offset 0x30 + UE reserved region
 
diff --git a/src/buffer.cpp b/src/buffer.cpp
index 5d39f69..b0922d7 100644
--- a/src/buffer.cpp
+++ b/src/buffer.cpp
@@ -101,20 +101,20 @@
     constexpr uint8_t bmcReadPtrOffset =
         offsetof(struct CircularBufferHeader, bmcReadPtr);
 
-    little_uint16_t truncatedReadPtr =
-        boost::endian::native_to_little(newReadPtr & 0xffff);
+    little_uint24_t truncatedReadPtr =
+        boost::endian::native_to_little(newReadPtr & 0xffffff);
     uint8_t* truncatedReadPtrPtr =
         reinterpret_cast<uint8_t*>(&truncatedReadPtr);
 
     size_t writtenSize = dataInterface->write(
         bmcReadPtrOffset, std::span<const uint8_t>{
                               truncatedReadPtrPtr,
-                              truncatedReadPtrPtr + sizeof(little_uint16_t)});
-    if (writtenSize != sizeof(little_uint16_t))
+                              truncatedReadPtrPtr + sizeof(truncatedReadPtr)});
+    if (writtenSize != sizeof(truncatedReadPtr))
     {
         throw std::runtime_error(fmt::format(
             "[updateReadPtr] Wrote '{}' bytes, instead of expected '{}'",
-            writtenSize, sizeof(little_uint16_t)));
+            writtenSize, sizeof(truncatedReadPtr)));
     }
     cachedBufferHeader.bmcReadPtr = truncatedReadPtr;
 }
diff --git a/test/buffer_test.cpp b/test/buffer_test.cpp
index 712c801..fce322b 100644
--- a/test/buffer_test.cpp
+++ b/test/buffer_test.cpp
@@ -44,7 +44,7 @@
     // CircularBufferHeader size is 0x30, ensure the test region is bigger
     static constexpr size_t testRegionSize = 0x200;
     static constexpr uint32_t testBmcInterfaceVersion = 123;
-    static constexpr uint16_t testQueueSize = 0x100;
+    static constexpr uint32_t testQueueSize = 0x100;
     static constexpr uint16_t testUeRegionSize = 0x50;
     static constexpr std::array<uint32_t, 4> testMagicNumber = {
         0x12345678, 0x22345678, 0x32345678, 0x42345678};
@@ -185,7 +185,7 @@
         } catch (const std::runtime_error& e) {
             EXPECT_STREQ(
                 e.what(),
-                "[updateReadPtr] Wrote '1' bytes, instead of expected '2'");
+                "[updateReadPtr] Wrote '1' bytes, instead of expected '3'");
             throw;
         },
         std::runtime_error);
@@ -193,11 +193,11 @@
 
 TEST_F(BufferTest, BufferUpdateReadPtrPass)
 {
-    constexpr size_t expectedWriteSize = 2;
-    constexpr uint8_t expectedBmcReadPtrOffset = 0x20;
-    // Check that we truncate the highest 16bits
+    constexpr size_t expectedWriteSize = 3;
+    constexpr uint8_t expectedBmcReadPtrOffset = 0x21;
+    // Check that we truncate the highest 24bits
     const uint32_t testNewReadPtr = 0x99881234;
-    const std::vector<uint8_t> expectedReadPtr{0x34, 0x12};
+    const std::vector<uint8_t> expectedReadPtr{0x34, 0x12, 0x88};
 
     EXPECT_CALL(*dataInterfaceMockPtr, write(expectedBmcReadPtrOffset,
                                              ElementsAreArray(expectedReadPtr)))
@@ -205,7 +205,8 @@
     EXPECT_NO_THROW(bufferImpl->updateReadPtr(testNewReadPtr));
 
     auto cachedHeader = bufferImpl->getCachedBufferHeader();
-    EXPECT_EQ(boost::endian::little_to_native(cachedHeader.bmcReadPtr), 0x1234);
+    EXPECT_EQ(boost::endian::little_to_native(cachedHeader.bmcReadPtr),
+              0x881234);
 }
 
 TEST_F(BufferTest, BufferUpdateBmcFlagsFail)
@@ -229,7 +230,7 @@
 TEST_F(BufferTest, BufferUpdateBmcFlagsPass)
 {
     constexpr size_t expectedWriteSize = 4;
-    constexpr uint8_t expectedBmcReadPtrOffset = 0x1c;
+    constexpr uint8_t expectedBmcReadPtrOffset = 0x1d;
     const std::vector<uint8_t> expectedNewBmcFlagsVector{0x04, 0x0, 0x0, 0x00};
 
     EXPECT_CALL(*dataInterfaceMockPtr,
@@ -270,8 +271,8 @@
                                                testQueueSize, testUeRegionSize,
                                                testMagicNumber));
     }
-    static constexpr size_t expectedWriteSize = 2;
-    static constexpr uint8_t expectedBmcReadPtrOffset = 0x20;
+    static constexpr size_t expectedWriteSize = 3;
+    static constexpr uint8_t expectedBmcReadPtrOffset = 0x21;
     static constexpr size_t expectedqueueOffset = 0x30 + testUeRegionSize;
 
     uint8_t* testInitializationHeaderPtr =
@@ -344,7 +345,7 @@
 
     // Call to updateReadPtr is triggered
     const std::vector<uint8_t> expectedReadPtr{
-        static_cast<uint8_t>(testOffset + testLength), 0x0};
+        static_cast<uint8_t>(testOffset + testLength), 0x0, 0x0};
     EXPECT_CALL(*dataInterfaceMockPtr, write(expectedBmcReadPtrOffset,
                                              ElementsAreArray(expectedReadPtr)))
         .WillOnce(Return(expectedWriteSize));
@@ -409,7 +410,7 @@
 
     // Call to updateReadPtr is triggered
     const std::vector<uint8_t> expectedReadPtr{
-        static_cast<uint8_t>(testBytesLeft), 0x0};
+        static_cast<uint8_t>(testBytesLeft), 0x0, 0x0};
     EXPECT_CALL(*dataInterfaceMockPtr, write(expectedBmcReadPtrOffset,
                                              ElementsAreArray(expectedReadPtr)))
         .WillOnce(Return(expectedWriteSize));
@@ -440,7 +441,7 @@
 
     // Call to updateReadPtr is triggered, since we read to the very end of the
     // buffer, update the readPtr up around to 0
-    const std::vector<uint8_t> expectedReadPtr{0x0, 0x0};
+    const std::vector<uint8_t> expectedReadPtr{0x0, 0x0, 0x0};
     EXPECT_CALL(*dataInterfaceMockPtr, write(expectedBmcReadPtrOffset,
                                              ElementsAreArray(expectedReadPtr)))
         .WillOnce(Return(expectedWriteSize));
