Skip to content
  1. Jan 09, 2016
  2. Jan 08, 2016
    • Insu Yun's avatar
      ipr: Fix out-of-bounds null overwrite · d63c7dd5
      Insu Yun authored
      
      
      Return value of snprintf is not bound by size value, 2nd argument.
      (https://www.kernel.org/doc/htmldocs/kernel-api/API-snprintf.html).
      Return value is number of printed chars, can be larger than 2nd
      argument.  Therefore, it can write null byte out of bounds ofbuffer.
      Since snprintf puts null, it does not need to put additional null byte.
      
      Signed-off-by: default avatarInsu Yun <wuninsu@gmail.com>
      Reviewed-by: default avatarShane Seymour <shane.seymour@hpe.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      d63c7dd5
    • Mike Christie's avatar
      scsi: add Synology to 1024 sector blacklist · 9055082f
      Mike Christie authored
      
      
      Another iscsi target that cannot handle large IOs, but does not tell us
      a limit.
      
      The Synology iSCSI targets report:
      
      Block limits VPD page (SBC):
        Write same no zero (WSNZ): 0
        Maximum compare and write length: 0 blocks
        Optimal transfer length granularity: 0 blocks
        Maximum transfer length: 0 blocks
        Optimal transfer length: 0 blocks
        Maximum prefetch length: 0 blocks
        Maximum unmap LBA count: 0
        Maximum unmap block descriptor count: 0
        Optimal unmap granularity: 0
        Unmap granularity alignment valid: 0
        Unmap granularity alignment: 0
        Maximum write same length: 0x0 blocks
      
      and the size of the command it can handle seems to depend on how much
      memory it can allocate at the time. This results in IO errors when
      handling large IOs. This patch just has us use the old 1024 default
      sectors for this target by adding it to the scsi blacklist. We do not
      have good contacs with this vendors, so I have not been able to try and
      fix on their side.
      
      I have posted this a long while back, but it was not merged. This
      version just fixes it up for merge/patch failures in the original
      version.
      
      Reported-by: default avatarAncoron Luciferis <ancoron.luciferis@googlemail.com>
      Reported-by: default avatarMichael Meyers <steltek@tcnnet.com>
      Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Cc: <stable@vger.kernel.org> # 4.1+
      9055082f
  3. Jan 07, 2016