Project

General

Profile

Actions

Bug #5748

closed

segfault when using 'line'-names that contain "/"

Added by roox over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/07/2022
Due date:
% Done:

0%


Description

The line name is part of the file name of the recording.
"/" should be properly filtered to not have issues.

This happens when you use 'TE2/0/1' as the line name:

   osmo-isdntap -c /etc/osmocom/osmo-isdntap.cfg --debug=DITAP:DQ931
  <0001> isdntap.c:254 (TE2/0/1) U->N Q.931 message SETUP
  <0000> isdntap.c:112 (TE2/0/1) Creating call state record for callref 26
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message SETUP
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message CALL PROCEEDING
  <0000> isdntap.c:493 (TE2/0/1:1) Starting B-channel recording 03080805240--20221107-002458
  <0000> isdntap.c:475 Error opening file /tmp//isdntap-TE2/0/1-03080805240--20221107-002458-1-tx.raw: No such file or directory
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message CALL PROCEEDING
  <0000> isdntap.c:341 (TE2/0/1:1) Cannot open B-channel
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message CONNECT
  <0000> isdntap.c:341 (TE2/0/1:1) Cannot open B-channel
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message CONNECT
  <0000> isdntap.c:341 (TE2/0/1:1) Cannot open B-channel
  <0001> isdntap.c:254 (TE2/0/1) U->N Q.931 message INFORMATION
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message INFORMATION
  <0001> isdntap.c:254 (TE2/0/1) U->N Q.931 message CONNECT ACK
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message CONNECT ACK
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message DISCONNECT
  <0001> isdntap.c:254 (TE2/0/1) U<-N Q.931 message DISCONNECT
  <0001> isdntap.c:254 (TE2/0/1) U->N Q.931 message RELEASE
  <0000> isdntap.c:523 (TE2/0/1:1) Stopping B-channel recording
  Segmentation fault (core dumped)

Workaround:
create the recording directory manually before the recording happens ...

mkdir -p /tmp//isdntap-TE2/0/
  <0000> isdntap.c:493 (TE2/0/1:1) Starting B-channel recording 03080805240--20221107-003444
  <0000> isdntap.c:479 (TE2/0/1:1) Opened file /tmp//isdntap-TE2/0/1-03080805240--20221107-003444-1-tx.raw
  <0000> isdntap.c:479 (TE2/0/1:1) Opened file /tmp//isdntap-TE2/0/1-03080805240--20221107-003444-1-rx.raw
Actions #1

Updated by roox over 1 year ago

  • Description updated (diff)
Actions #2

Updated by laforge over 1 year ago

  • Status changed from New to Resolved
  • Assignee set to laforge

resolved in

commit 4a4efc0b960043c9de1a72af211cad934f2d7334 (HEAD -> master, origin/master)
Author: Harald Welte <laforge@osmocom.org>
Date:   Tue Nov 8 09:06:56 2022 +0100

    don't accept any arbitrary string as 'name' as we use it in a path

    osmo_identifier_valid() is likely much more strict than just checking
    for invalid symbols in a path, but let's use it as we already have it
    around.

    Closes: OS#5748
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)